Jump to content
  • Advertisement
Sign in to follow this  
Schizoslayer

Rotating Cube on it's Bottom Edge

This topic is 3167 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

I'm trying to rotate a Cube towards a destination in world space. The desired behaviour is that the cube will only rotate on it's bottom edges so it can effectively only move forwards/back/left/right in order to get to its destination. I am applying an angular velocity (torque) each frame in local space to the Cube but as it rotates the axis I have to apply the torque to changes and this has caused my brain to melt and form a small puddle around my feet. Any help would be appreciated. My 3D maths skills just aren't good enough to handle this it seems. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Update: I've managed to establish which axis I should rotate the Cube around in order to move it towards it's destination. (disregarding the axis with the most "Up" and then finding the axis most perpendicular to the destination).

My current problem is in finding the direction I need to turn the actor (IE establishing if the destination is in front or behind of the cube).

I was using a dot product to determine this but for some reason after the cube moves a short distance towards the destination it flips and starts going backwards.

Share this post


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

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!