Jump to content
  • Advertisement
Sign in to follow this  
diophantes

Problem with Angularvelocity Parameters in ODE

This topic is 4007 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hei everybody, I would like to ask for help ? Sorry for my english if i make some mistakes but i am french ... So what about my "strange problem", i will try to explain it as good as I can. I have a simple program, with a field of football, and i have some cubes who correspond to robots. Doesn't matter how many ... Let's just say there is one. In my code I have a user control, that i can move the robot. For now I used to move the robot by changing the linearvelocity and the rotation. It was fine and was working. Code: dBodySetLinearVel(opp1->getBodyRobot(),cos(orientation)*robo_x_vel, sin(direction)*robo_x_vel,robo_z_vel); dRFromAxisAndAngle(Ro,0,0,1,direction); dBodySetRotation(opp1->getBodyRobot(),Ro); dBodySetRotation(opp1->getBodyKicker(),Ro); But now i want to use the angularvelocity in order that the speed of the robot when he changes the orientation could take different values, and so could be slow or fast ... depending on the value ... and the robot will stop moving when he will be in the position asked. Code: //Set the velocity dBodySetLinearVel(opp1->getBodyRobot(),cos(direction)*robo_x_vel, sin(direction)*robo_x_vel,robo_z_vel); dBodySetAngularVel (opp1->getBodyRobot(), 0, 0, 40); The problem is that when i set the angular velocity on the z-axis, the robot turn, and after few time, if i move him by changing the linearvelocity, he just become "crazy" and not stable, and turn with just touching the ground, with a corner of the cube. I would like he stay right compared to the ground. Hope i'am clear in my explanations, if i am not, please tell me, i will try to do a video of what happen and give a link. Thank you. Pierre-Alain

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!