I’ve added a hitbox to it, but in game the player can run right through it. So I tried adding another mesh (a box) called physics. But that hasn’t worked either.
So then I tried adding a ‘collisionShape - Box’ in the object’s .dbr itself. But still no luck, I can still run right through it.
What we typically do for interactive objects we want to have collision is to have the object as a decoration or script-spawned entity and then have an interactive quest object nearby to serve as the NPC.
No, I just saved the changes to the level when I exited the Editor. How can I update just this level’s pathing and not the whole world’s?
I just opened the Editor. Is it the ‘Rebuild Selected Pathing’ option?
Edit: Ha! Yes it is and that did the trick. The collision is working now. One slight problem, the ‘cube’ part has dropped to the floor beside it (I guess you can’t have an NPC floating above a decoration with collision).
But just for future reference, which type of collision is now working? Did I just need a hitbox? A hitbox and physics mesh? The collisionShape in the .dbr? Or all 3 are needed?
You can update the NPC to be allowed off the path mesh, it’s the same trick we use for bounty tables (and consequently the reason why walking up to bounty tables can be annoying).
I believe you always need a hitbox. A physics mesh is necessary for creating pathable assets (ex. a bridge), but you may also need it. The collision shape in the dbr is outdated stuff and does not need to be changed.