physx raycasting works back to front?

Started by
-1 comments, last by chillypacman 16 years, 7 months ago
I'm having a really annoying problem here. Basically I have set up a function that casts a ray to be used for firing a gun. PhysX seems to be takinga reverse approach with the ray casting. For instance here: -> * | where -> is the cast ray, * is a static actor with name 'monster' and | is a static actor with name 'wall' what happens is the first callback I get is for the wall was hit. So the thing is working in reverse. If I set it so that it ignores hitting the wall and continues casting what happens is the opposite siutation: * | <- causes the ray to go through the wall and into the monster which I don't want. I don't want to set up the monster actor as dynamic (gameplay reasons) so the ray I acst looks for all static actors (i.e. NxShapesType::NX_STATIC_SHAPES). Could anyone please help me here? edit: fixed the problem, used raycastClosestShape instead of the other function [Edited by - chillypacman on September 16, 2007 11:02:35 AM]

This topic is closed to new replies.

Advertisement