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);
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?