Auto Roll

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 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.

• 4

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.

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