Game Development Community

ContainerRayCast and Physx

by RoundedIcon · in Torque 3D Beginner · 02/09/2014 (4:26 pm) · 6 replies

I can't seem to get ContainerRaycast to interact with any PhysicsShape objects. I have tried multiple typemasks but none of them seem to work.

#1
02/09/2014 (6:07 pm)
what is the typemask you are specifying? They are a child class of gamebase.

Try using the $TypeMasks::GameBaseObjectType to filter it out.
#2
02/09/2014 (6:33 pm)
Still returning nothing. The function works perfect fine with other objects. Would the fact this is a server command have anything to do with it?
Edit: Ignore that last bit. The raycast still fails if it's not a server command.
#3
02/11/2014 (4:31 pm)
Using stuff from this thread I made my own containerRayCast function specifically for Phsyx. Still, if anyone has a different fix feel free to post it. Considering this is the first thing I have really done with C++ I am surprised it worked at all.
#4
02/11/2014 (4:38 pm)
Ah - indeed, it shouldn't function correctly if it's not a server command for game objects. Only the server knows where those objects really are; the client could be lying....
#5
02/11/2014 (5:10 pm)
Can containerraycast even detect phsyx objects? The function I made with mPhysicsWorld->castRay worked perfectly. Both functions were called server side on the same objects and only the last one detected the physics shape.
#6
02/11/2014 (7:29 pm)
I doubt it - I'm not sure how the PhysX "world" is integrated with the rest of T3D's scene system, but I don't think the original containerRayCast() has really changed since TGE....