I need to detect the collision between object and viewer (avatar). My scene is a set of rooms, and I do not want the viewer to run through walls. I use WakeupOnCollisionEntry and WakeupOnCollisionExit conditions ... but how avoid the modification in transform related to viewer?
Thanks a lot.
WakeupOnCollisionEntry and WakeupOnCollisionExit detect collisions, and what you want to do is collision avoidance. In order to do that, you7ll need to change your navigation code to do the following: 1. Calculate the user's proposed path and distance. 2. Put a pick shape over that path and see if it hits anything. 3. If step two has an intersection, stop somewhere before that intersection.
If you're just doing simple straight line navigation, just using PickRay or PickLineSegment (or something like that) from the viewplatform position oriented in the direction the user is going is probably enough.
For more details and a better write up, see http://j3d.org/implementation/collision.html
--Brad Vender
=========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".