Bullet best function for moving eg. humans

Post your questions, suggestions and experiences regarding game design, integration of external libraries here. For irrEdit, irrXML and irrKlang, see the
ambiera forums
Post Reply
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Bullet best function for moving eg. humans

Post by Nadro »

What is the best function for moving eg. People in Bullet Engine? applyImpulse, setForce etc. ?
JonLT
Posts: 152
Joined: Thu Mar 15, 2007 5:47 pm
Location: Denmark

Post by JonLT »

I don't know how Bullet works, but this might help you.
this is the essence of this post on the newton forum:

Code: Select all

force = ( desiredVelocity - currentVelocity ) * mass 
addForce ( force / updateStepSpeed )
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Post by Nadro »

Yes this is good function for moving in Newton, but in Bullet We can't use it.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Yes you can. Bullet has an "applyForce" function.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Post by Nadro »

Is fact, but how can I good calculate 2 params for applyForce eg. first: force is good, bacause this is vector my moving, but rel_pos? if i have good moveing vector and rel_pos(0,0,0) my node isn't move:/
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Hey I recommend to use the framework from the Irrlicht Bullet Demo, it is very well made. (Also remember to apply the fix by omaremad at the end, and if you are using msvc there are some small errors to fix as they pop up for the iterators and things (There is also a triangle mesh cast or something).)

Here it is: http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=17910
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Post by Nadro »

Yes this is good framework, but I have all this function in my app, and in this framwork hasn't moving eg character. But meybe it has applyForce :) I'm starting download for it:)
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Post by Nadro »

I done human controller
Post Reply