Bullet Kinematic Character Controller Demo

A place to show off your latest screenshots and for people to comment on them. Only start a new thread here if you have some nice images to show off!
User avatar
akilar
Greenskin
Posts: 138
Joined: Wed Jun 20, 2007 11:42 am
Location: Taiwan
x 17

Bullet Kinematic Character Controller Demo

Post by akilar »

just look:


welcome to my blogger, thanks. :D
http://makedreamvsogre.blogspot.com/
kaugit
Gnoblar
Posts: 7
Joined: Mon Feb 27, 2012 12:31 pm

Re: Bullet Kinematic Character Controller Demo

Post by kaugit »

Very nice !

Do you also know how to make the main character not being able to push other characters ? (Static NPCs, ...)
User avatar
Waruck
Goblin
Posts: 210
Joined: Mon Dec 12, 2011 12:52 pm
Location: Germany
x 34

Re: Bullet Kinematic Character Controller Demo

Post by Waruck »

If you're using bullet for physics simulation as well as player-movement everything that is given a mass-value other than 0 is 'pushable' and will be affected by physics. if you want to have something that is not pushed by other objects set it's mass to zero and move it by manual giving it velocity.
UT2007
Kobold
Posts: 31
Joined: Fri Feb 17, 2012 10:09 am
x 5

Re: Bullet Kinematic Character Controller Demo

Post by UT2007 »

Hi,

How did you build your map, i mean with which map editor did you use ?

Thanks and regards
User avatar
duststorm
Minaton
Posts: 921
Joined: Sat Jul 31, 2010 6:29 pm
Location: Belgium
x 80

Re: Bullet Kinematic Character Controller Demo

Post by duststorm »

When you have integrated player controls with the physics engine the next step can be making those two play well with pathfinding and steering ;)
Developer @ MakeHuman.org
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179

Re: Bullet Kinematic Character Controller Demo

Post by jacmoe »

UT2007 wrote:How did you build your map, i mean with which map editor did you use ?
You have been deactivated because you've earned it. Congratulations.
You've been reported for spamming by lots of people.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
olgabo
Gnoblar
Posts: 1
Joined: Fri Jun 22, 2012 2:32 pm

Re: Bullet Kinematic Character Controller Demo

Post by olgabo »

Nice work! Are you using btkinematiccharactercontroller class to control the character? I´m trying to integrate Bullet properly into my Ogre project, and I can´t really find a good solution for controlling the character. I created a rigid body for the character, and set it to be kinematic object, however, that means I need to handle the collision myself. Going through all the collision pairs seems to be a bad idea. Another thing, I process user input using Ogre, and if I use btkinematiccharactercontroller, I guess it is supposed to handle that instead?
I haven't been using all this stuff before, that´s why I would appreciate some tips, as you seem to be more experienced here than me...
N_K
Greenskin
Posts: 115
Joined: Wed Dec 07, 2011 9:05 pm
x 4

Re: Bullet Kinematic Character Controller Demo

Post by N_K »

EDIT: Thinking a bit about it, this controller seems to be quite easy to remake. Judging from what is presented in the video, it seems like that the character itself is a kinematic capsule, with zero angular factor. There doesn't seems to be vertical movement (and he avoids the ramp near the end of the video), so I think there is no raycasting (sweep test?) to determine the vertical position of the player at the moment. Is this correct?

I'll try to implement something similiar to this. Thanks for giving me the basic idea what to do.
Last edited by N_K on Mon Jun 25, 2012 12:11 pm, edited 1 time in total.
mdias
Gnoblar
Posts: 19
Joined: Mon Jan 30, 2012 4:25 pm
x 2

Re: Bullet Kinematic Character Controller Demo

Post by mdias »

N_K wrote:EDIT: Thinking a bit about it, this controller seems to be quite easy to remake. Judging from what is presented in the video, it seems like that the character itself is a kinematic capsule, with zero angular factor. There doesn't seems to be vertical movement (and he avoids the ramp near the end of the video), so I think there is no raycasting (sweep test?) to determine the vertical position of the player at the moment. Is this correct?
I have made something similar, but for a 2D platformer and that's the basic idea.
I've put a vertical capsule, with zero angular factor, on top (connected with a ball constraint) of a cylinder that rotates on the surface of the ground and I've got a walking/running character that can even climb stairs if needed. You may even play around with tricks such as seting the cylinder angular velocity and then making it's angular factor zero so that running up hills won't slow you down.

Jumping can be a problem though as it seems that jump height varies a bit depending on which forces are already acting on your object. I've worked around this by making sure the player is touching the ground for some time before you can jump (so that you won't jump while the object is recovering from huge penetrations that occur when falling from high heights for example).

No manual collision response at all, and it works well enough for now :)
User avatar
akilar
Greenskin
Posts: 138
Joined: Wed Jun 20, 2007 11:42 am
Location: Taiwan
x 17

Re: Bullet Kinematic Character Controller Demo

Post by akilar »

thanks, for all response.
i think physicx character controler is better than bullet, but no ios release lib.
N_K
Greenskin
Posts: 115
Joined: Wed Dec 07, 2011 9:05 pm
x 4

Re: Bullet Kinematic Character Controller Demo

Post by N_K »

Hey Akilar, would you mind sharing the code of this demo app with us? There's no btKinematicCharacterController Ogre integration sample code yet on this forum (there was one about 2 years ago, but it uses a quite old version of Bullet), so it would be a great help. :wink:
User avatar
akilar
Greenskin
Posts: 138
Joined: Wed Jun 20, 2007 11:42 am
Location: Taiwan
x 17

Re: Bullet Kinematic Character Controller Demo

Post by akilar »

i have a scene editor(develope by my self).
UT2007 wrote:Hi,

How did you build your map, i mean with which map editor did you use ?

Thanks and regards
User avatar
akilar
Greenskin
Posts: 138
Joined: Wed Jun 20, 2007 11:42 am
Location: Taiwan
x 17

Re: Bullet Kinematic Character Controller Demo

Post by akilar »

You can see the App_CharacterDemo in bullet demo project(the DynamicCharacterController class), i use bvh for static collision prupose.
N_K wrote:Hey Akilar, would you mind sharing the code of this demo app with us? There's no btKinematicCharacterController Ogre integration sample code yet on this forum (there was one about 2 years ago, but it uses a quite old version of Bullet), so it would be a great help. :wink:
N_K
Greenskin
Posts: 115
Joined: Wed Dec 07, 2011 9:05 pm
x 4

Re: Bullet Kinematic Character Controller Demo

Post by N_K »

So you use the built-in character controller without any modifications?
User avatar
akilar
Greenskin
Posts: 138
Joined: Wed Jun 20, 2007 11:42 am
Location: Taiwan
x 17

Re: Bullet Kinematic Character Controller Demo

Post by akilar »

i just modify some integration code for my engine request. i write CCanHandleHitResultControler class to over write btKinematicCharacterController member function. like updateAction, i rewrite playerStep funtion for my special request( i want to control grivaity by my jump function).
N_K wrote:So you use the built-in character controller without any modifications?