IrrBullet Rigid body Character
-
- Posts: 1
- Joined: Wed Jul 17, 2013 2:28 pm
IrrBullet Rigid body Character
Hi I'm new here so sorry if I'm posting in the wrong section. I've been trying to make an MOG (Multiplayer Online Game) with Irrlicht and IrrBullet and everything works great except the character physics. Currently I'm using a Kinematic Character Controller for the player's character and I've been trying to use it for the other players too but it makes the model shake occasionally when walking and doesn't collide with the other characters. I tried using the translate method of the Rigid Body, but that only stops the shaking, and makes it only collide with the ground, not the walls. Any other method of movement such as setLinearVelocity does not work at all. Is there any way I can get my characters to move right?
Re: IrrBullet Rigid body Character
Mhm. I made one some time ago for a quick-and-dirty-test. I needed some properties of a RigidBodyControl so i made one, but it aint good code or anything like comfortable using. But it was patched together in a matter of minutes and maybe you find some inspiration in it?
Header:
http://pastebin.com/jdPyYDFG
cpp-File:
http://pastebin.com/C7QA97h0
But be warned, rly. Its NO CLEAN CODE. It was a quick-'n-dirty testing thing and only meant for inspiration.
Even tho it kinda works like a charme for what i needed it for. ( Movement through a voxel generated world (smooth, no blocks) with some feedback etc implemented in the collisonlisteners. Not implemented in that one here, tho. )
Header:
http://pastebin.com/jdPyYDFG
cpp-File:
http://pastebin.com/C7QA97h0
But be warned, rly. Its NO CLEAN CODE. It was a quick-'n-dirty testing thing and only meant for inspiration.
Even tho it kinda works like a charme for what i needed it for. ( Movement through a voxel generated world (smooth, no blocks) with some feedback etc implemented in the collisonlisteners. Not implemented in that one here, tho. )
Re: IrrBullet Rigid body Character
Fast "hack" that works for me-
Code: Select all
btVector3 vector(position.X, position.Y, position.Z);
btMotionState*mste=rigidBody->getMotionState();
btTransform tr;
tr=rigidBody->getWorldTransform();
tr.setOrigin(vector);
rigidBody->setWorldTransform(tr);
mste->getWorldTransform(tr);
tr.setOrigin(vector);
mste->setWorldTransform(tr);
Re: IrrBullet Rigid body Character
Can someone repost MrGuy example please.
Thanks
Thanh
Thanks
Thanh
Re: IrrBullet Rigid body Character
Cool "hack", just recently came across this post.