Author Topic: Raycasts and StaticShapes  (Read 580 times)

I'm curious as to what's necessary for the two to interact, $TypeMasks::StaticShapeObjectType is implies that there's a working typemask, does the StaticShape need a collision in order for it to function properly?

Yeah. I'm pretty sure raycasts interact with collision boxes.

Yeah. I'm pretty sure raycasts interact with collision boxes.
Then my problem now is having 0 clue how to make a collision box that goes with a staticshape. Does it follow the same principals behind a vehicle?

For collision, you need an object whose name starts with Col in a negative detail level (most commonly Collision-1). With the new exporter, you just need to add a mesh whose name starts with Col and it will use the right LOD by default (though you could specify it yourself with object groups). With the old exporter, you need the same mesh, but you also (I think) need to add its layer to the list of collision LODs in the exporter settings.

If you want to specify a raycast collision mesh that is different from the ordinary collision mesh, you can make an object whose name starts with LOSCol and place it in a negative detail level. The detail level size might need to be smaller than -16, but I'm not sure about that.