Collision Hitbox Not Working

I’ve made a small Altar in 3ds Max (using one of the TQ Assets).

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.

Does anybody have any ideas?

Looks like that’s an NPC?

NPCs do not have collision.

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.

Hi Zantai, the ‘cube’ part above is indeed an NPC, it’s the ‘horadric cube’ (I’m working on the Reign of Terror mod).

The pillar/altar I made is the bottom part (which is separate) and just a simple decoration. I’m trying to add collision to this part.

Did you update the level’s pathing after placing the object?

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).

image

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.