Jump to content
  • Advertisement

dmh2000

Member
  • Content Count

    1
  • Joined

  • Last visited

Community Reputation

122 Neutral

About dmh2000

  • Rank
    Newbie
  1. ok, I'll take a stab. it seems to me what you want to do is first figure out the direction the ball needs to roll in the X/Z plane. direction = atan2(z,x), something like that. Then, rotate the ball around the Y axis (yes I mean Y axis) by this amount so that Z is pointing along the direction of travel. Then, rotate around the X axis an amount based on how far it should move, which you can figure out based on the ratio of the distance of travel in X/Z over the circumference of the sphere * 360.0. There would be no rotation around the Z axis. Be sure to convert radians and degrees properly.
  • 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!