PDA

View Full Version : How Do I get a sphere to roll down a hill?


sorenkahl
12-11-2014, 03:10 PM
I'm doing a final for a Game Simulation class and I can't seem to figure out how to get a ball to roll correctly down a hill. When I combine sphere move and sphere roll in a roll method it won't go down the hill towards the shack. I've turned the sphere and changed the way it moves but no go. Any advice on how to do this correctly?

Thanks
-sorenkahl

AliceAndConnor
12-11-2014, 08:56 PM
Hi sorenkahl! Good question! Thank you for uploading your world, and I have now changed it so now the ball will role down the hill, and have a rolling animation!
What I did was change the rolling method to where I altered the 'do together' code slightly, making the sphere move down 3.5 meters, belong side moving backward. This made it gently go down the hill, but doing so I still needed to incorporate the rolling animation as you had made earlier (to make it look realistic):). So then I created a copy of that sphere, which would vehicle the sphere that's actually moving, set the original sphere to 0% opacity, and made the new sphere have a roll animation in the roll method still. :D:D:D

And that's what I did! You can download it below and it's ready to go! Bye!

AliceAndConnor
12-11-2014, 11:13 PM
Woops, sorry about that! I've made it so that the ball won't roll down to the shack, but to the left. Here's an updated version where it rolls to the shack! :)

Hoped this helped, bye! :D:D:D