Jump to content

jonidunno

Recommended Posts

sup bb

I'm not sure how you could do this without a solver, since it's accumulating rotation over time based on the speed and direction of motion each frame. I could be all kinds of wrong, though. 

Here's my method... I'm using the distance traveled and a vector orthogonal to the direction of travel to build an angle/axis quaternion, and adding (qmultiplying) that quaternion to the existing orient for each timestep. It's not perfect but it seems to work pretty well. Since it's basing the rotation angle on cross(dir, up), it might freak out if the ball rolls straight down. Curious if any smart people have a better answer for that.

 

AutoRoll01_toadstorm.hip

  • Like 4
Link to comment
Share on other sites

14 minutes ago, toadstorm said:

sup bb

I'm not sure how you could do this without a solver, since it's accumulating rotation over time based on the speed and direction of motion each frame. I could be all kinds of wrong, though. 

Here's my method... I'm using the distance traveled and a vector orthogonal to the direction of travel to build an angle/axis quaternion, and adding (qmultiplying) that quaternion to the existing orient for each timestep. It's not perfect but it seems to work pretty well. Since it's basing the rotation angle on cross(dir, up), it might freak out if the ball rolls straight down. Curious if any smart people have a better answer for that.

 

AutoRoll01_toadstorm.hip

Thanks Mr. Toadstorm... I think this could do the trick for what I'm doing! 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...