Page 1 of 1

IrrBullet Rigid body Character

Posted: Wed Jul 17, 2013 2:36 pm
by Jenerik Industries
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

Posted: Tue Jul 23, 2013 8:47 am
by MrGuy
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. )

Re: IrrBullet Rigid body Character

Posted: Mon Sep 23, 2013 2:29 pm
by Otaka
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

Posted: Fri May 02, 2014 4:07 am
by thanhle
Can someone repost MrGuy example please.

Thanks
Thanh

Re: IrrBullet Rigid body Character

Posted: Thu Jul 31, 2014 1:55 am
by GameDude
Cool "hack", just recently came across this post.