Rotate the ICharacterController

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
happyer
Posts: 17
Joined: Wed Aug 15, 2007 2:07 pm

Rotate the ICharacterController

Post by happyer »

In irrnewt, how to change the IJointUpVector after creating the ICharacterController? Since I want to make a person who will sometimes lie down and sometimes stand up. But I have lock all the 3 axis of the joint of the CharacterController already when creating it by

Code: Select all

irr::newton::SJointUpVector jointData;
jointData.ParentBody=characterController;
jointData.PinDir.set(0.0f,1.0f,0.0f);
irr::newton::IJointUpVector* joint=theWorld->createJoint(jointData);	
jointData.PinDir.set(1.0f,0.0f,1.0f);
joint=theWorld->createJoint(jointData);
So what should I do?

When I simply rotate the CharacterController, it will automatically rotate back. I guess this is because the UpVector. I have tried the setPin() function, but it seems not working as it only rotate by a small degree. What I want to do is, the bounding box of the CharacterController can be either vertical or horizontal.

Could anyone tell me how to achieve this?
Post Reply