Jump to content
  • Advertisement
Sign in to follow this  

physx raycasting works back to front?

This topic is 4110 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!