I have a FPS cam with a collision responce animator on it (basicaly the same as in the quake level tutorial).
If i try to use setPosition to move the camera to another room (ie teleport) it stops on the wall, it seems the collision system wont let it move through the wall, even if you set its position a long way away (would have thought it would be able to jump through it if moved far enough to not end up stuck in the wall).
So i guess my question is how do you work around this? iks there like an off switch for collisions so i can turn it off, move and then turn it back on?
SetPosition and Collisions
Yes, you're right, if you move a node with collision response it stops at every obstacle that is in its way !!!
I found no switch for enable/disable the collision response animator, but you can remove and add it !!!
So if you want to move the node use removeAnimator(ISceneNodeAnimator *animator) to remove the animator...
I found no switch for enable/disable the collision response animator, but you can remove and add it !!!
So if you want to move the node use removeAnimator(ISceneNodeAnimator *animator) to remove the animator...
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
I only just got around to testing this (long time i know)
but if i remove the animator then move the camera and then re-ad the animator, the animator pops the camera back to where it was.
i tried removing and destroying the animator, moving the camera then making a new animator and adding that but that doesnt work either. for some reason gravity doesnt work any more even though the gravity is definately being set in the animator.
note im trying to do this ever frame. i thought it would work since surely the collision animators only do stuff during the pre or post render, so anything i do to them during my updates shouldnt effect that, but it seems it does.
any other ideas for ways around this?
but if i remove the animator then move the camera and then re-ad the animator, the animator pops the camera back to where it was.
i tried removing and destroying the animator, moving the camera then making a new animator and adding that but that doesnt work either. for some reason gravity doesnt work any more even though the gravity is definately being set in the animator.
note im trying to do this ever frame. i thought it would work since surely the collision animators only do stuff during the pre or post render, so anything i do to them during my updates shouldnt effect that, but it seems it does.
any other ideas for ways around this?
-
- Posts: 20
- Joined: Sun Aug 27, 2006 9:10 pm
- Location: U.S.A.
- Contact: