Character walking

ceacy

21-11-2006 06:33:29

Hi,
I'm trying to make a character walking, with a first person view. I followed this tutorial, but there are several things i don't understand :
1. Where does this :
feet->setAngularVelocity(q*Ogre::Vector3(10*cos(1),0,10*sin(1)));
come from, and what does it mean ? I mean, why "cosinus" and "sinus" ? And why not only a component in X, since it's the rotation axis ?

2. How to strafe left and right ? Can i use a "Ball and Socket" joint instead of a hinge, joint, to have the feet able to rotate around x and z ?

3. I read using addTorque() instead of setAngularVelocity() would be better ; if so, when could i find documentation on it ? I read the samples (quickly), but i don't get everything.

4. Since the world is not a singleton any more, when should i delete it ? After, before the stepper ? Should i detach all ogreode objets and destroy them before that ?

Thanks,
Ceacy.

ceacy

21-11-2006 20:07:18

1). I have finally managed to do it by using a "ball and socket" joint instead of a hinge one.
2). I've read the wikipedia page about torque, to understand what is it, so it's a bit clearer to me now. However, is it normal that i've got to use very big forces (i.e, 100000 for the x component of the torque) ?
3). Not found yet ;)

tuan kuranes

29-11-2006 14:44:44

1,2,3 : Check ODE wiki for that. it has its own version, maybe more physically correct, of the "walking character problem"

4: Delete every world related OgreOde object instance before deleting world.

ceacy

29-11-2006 15:21:03

Thank you :)