CollisionBox (extra words for limit)

Does a CollisionBox work like a CollisionSphere or a CollisionInvSphere?

Like a CollisionSphere, I believe: Things inside it are considered to be colliding with it, while things outside it are considered to not be colliding with it.

Then what collision solid should I use so that the player doesn’t fall of? (I want it to be like a box kind of solid as CollisionInvSpheres are uneven for box kind of objects).
Model: room.bam.pz (1.8 KB)

I’m not quite sure of what you mean.

If you just want a floor, would a CollisionPlane not work? Or a CollisionBox placed beneath the ground?

If you want a fully-enclosed box, then six CollisionPlanes should work. If there’s an opening, then several CollisionBoxes, placed appropriately, might be used.

Otherwise, you can always model and export custom collision-geometry in your modelling program.

I mean that in the model, so that the player doesn’t fall of, I need a Collision Solid that surrounds the entire model. But I don’t want a CollisionInvSphere as it meant for circular objects whereas a CollisionBox can be used for cubes and cuboids. But boxes detect anything inside. I want a solid that detects if anything is outside like an inverse sphere.

There isn’t one that does exactly that, I don’t believe.

However, remember that you don’t need one single collision-solid for your walls: you can compose them of multiple solids.

So, for example, you could use one box each for the walls that lack doors (remembering that boxes don’t need to be cubes), and a few boxes to compose the wall that has a door. Likewise, a single box each could represent the floor and ceiling.

Or, again, you can use custom-modelled collision-geometry.

Any of these should prevent your character from moving through the walls, presuming that said character doesn’t move particularly rapidly.

I concur: the reason there isn’t a CollisionInvBox is that six planes will do.

1 Like