The Armor Games website will be down for maintenance on Monday 10/7/2024
starting at 10:00 AM Pacific time. We apologize for the inconvenience.

ForumsProgramming ForumGravity and Physics

5 4122
staticzone
offline
staticzone
67 posts
Nomad

Hey guys, I was wondering. How do you get a ball to roll down a slope or a curve, and then grab it and drop it so it slides down any curved movie clip and multiple ones as well. What is the code for this?

If you could help me out a bit it would be really appreciated
Thanks

  • 5 Replies
staticzone
offline
staticzone
67 posts
Nomad

kinda stumped on this

akunu
offline
akunu
35 posts
Nomad

Thats a very hard question to answer, beacuse it envolves a lot of complicated phystics and math. But, you could use Box2d and do exactly that and a lot more.

beech
offline
beech
107 posts
Nomad

ok - well this is a pretty complicated subject if one was to start from scratch to achieve it - you'd pretty much be building a physics engine.

so, the alternative is to use an out-of-the-box solution, namely: Box2D - however it is somewhat advanced even to use the API and will take a fair amount of work and reading just to get you set up. also look into the WCK (world construction kit) for Box2D - this does make things a little simpler, and is quick to construct once you understand the basics

beech
offline
beech
107 posts
Nomad

LOL akunu (you beat me typing) phahahahh

staticzone
offline
staticzone
67 posts
Nomad

Ok, thanks anyways

Showing 1-5 of 5