I'm trying to write an action game with large amout of physics. I'm now use irrbullet's kinematicCharactorController for main character physics. I meets some problem that I'm not quit understand.
1. How can I set the character's collision shape to the controller(IN my code it's just a single point resulting in that the character can have half body buried in walls)?
2. Why can't my character walk across a piece of paper on the ground?
My code I create the controller:
kinctrl = new IKinematicCharacterController(world);
My code I update my character:
chara->setPosition(kinctrl->getWorldTransform().getTranslation()); // chara is irrlicht animated mesh scene node
kinctrl->setPositionIncrementPerSimulationStep(direction * speed); // direction is move direction with user input
Need some help about KinematicCharacterController
-
- Posts: 9
- Joined: Mon Dec 07, 2009 7:48 am
-
- Posts: 37
- Joined: Fri Nov 04, 2011 12:15 am
Re: Need some help about KinematicCharacterController
Haven't used irrBullet, just the normal Bullet, but you should be able to set a collision shape and scale/manipulate for your controller. Also, my code for updating physics objects is much longer,involving actually making sure the bounding boxes that Irrlicht calculates matches up with Bullet's collision shapes. The inability to walk across a piece of paper on the ground, providing that your ground is flat, probably means that your stepheight is set to 0 or something. That's if I understand the problem right. Post some screencaps of your problem, its really helpful with physics debugging.
Sorry I couldn't be more helpful.
Sorry I couldn't be more helpful.