Page 1 of 1

SetPosition and Collisions

Posted: Mon Dec 25, 2006 9:14 am
by Mloren
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?

Posted: Mon Dec 25, 2006 1:17 pm
by Acki
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...

Posted: Wed Feb 14, 2007 1:08 am
by Mloren
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?

Posted: Sun Mar 18, 2007 1:41 am
by HondaDarrell
I'm trying something similar. I'm using a camera node with a collision response animator. But when I try setting the position of the camera nothing happens. Does the animator interfere with manual translation?

Posted: Sun Mar 18, 2007 4:41 am
by BlindSide
Yeah this happens to me too.