jonidunno Posted February 7, 2019 Share Posted February 7, 2019 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 Quote Link to comment Share on other sites More sharing options...
toadstorm Posted February 8, 2019 Share Posted February 8, 2019 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 4 Quote Link to comment Share on other sites More sharing options...
jonidunno Posted February 8, 2019 Author Share Posted February 8, 2019 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! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.