How to rotate a sceneNodeAnimator or redefine it.

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
benjani13
Posts: 25
Joined: Sat Aug 07, 2010 8:12 pm

How to rotate a sceneNodeAnimator or redefine it.

Post by benjani13 »

Hi, I have a problem with the player model's collision animator. I rotate the player model but the ellipsoid of the collision animator doesn't rotate.

I create the collision animator with these values:

Code: Select all

scene::ISceneNodeAnimator* anim = smgr->createCollisionResponseAnimator(
			selector, playerNode, core::vector3df(19, 40.0f, 9.25f),
								core::vector3df(0, -10, 0), core::vector3df(0, 18, -1));
If I walk right to a wall, the collision is good:
ImageImage

But if I rotate the model to 90°, the ellipsoid doesn't rotate:
ImageImage

So I'd like to know how to rotate the animator attached to the model or at worst how to delete it(for redefine it after the model rotation).
Thanks ;)
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

If you rotate an allipsoid around y-axis, there won't be any change. So I guess the ellipsoid is just too small in this case.
benjani13
Posts: 25
Joined: Sat Aug 07, 2010 8:12 pm

Post by benjani13 »

hybrid, the ellipsoid can have a different size in x and z, so if you rotate to 90° the x become y and y become x. If you look my screens my ellipsoid is bigger in x than in z. It's not a sphere.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

As far as I can see, there's only rotation around the y-axis (which is up-axis in Irrlicht). Hence, the extent won't change in those directions.
Post Reply