Jump to content

Recommended Posts

I'm trying to create an automated ball roll... I found some helpful tips online but am still struggling to get it to roll correctly. Attached is what I started...

I'm wondering if there is an easier way to rig this? Maybe through a sop solver. Anyways any help is much appreciated!

 

Thanks,

AutoRoll01.hip

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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! 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×