PDA

View Full Version : Help getting ground's angle


theNoobOne
02-19-2008, 03:41 PM
I have a ball, that ball will fall from a ramp.

That ramp is made from sprites, squares, shapes, ... movieclips or graphics.

The ramp can have any size, any angle, and it can be curve.
http://www.newdisability.com/Ramp-Size.jpg
http://www.webgamemagazine.com/wp-content/uploads/2006/12/peashy_screen.gif

I want to know the angular variation between X and delta-X of that point of the ramp.

By other words, I want to determine the inclination of the floor where the ball is at thet moment, so that i know if it is a ramp or a plane floor, and if the ball should roll down the ramp.

ASWC
02-19-2008, 05:29 PM
check all these tutorials and you'll find what you need

theNoobOne
02-19-2008, 06:25 PM
check all these tutorials and you'll find what you need

what tutorials? :confused:

ASWC
02-19-2008, 06:44 PM
Ooops, editing issue... here they are:

http://www.emanueleferonato.com/2007/02/03/create-a-flash-draw-game-like-line-rider-or-others-part-2/

theNoobOne
02-19-2008, 07:21 PM
Ooops, editing issue... here they are:

http://www.emanueleferonato.com/2007/02/03/create-a-flash-draw-game-like-line-rider-or-others-part-2/

Thanks ;)

cdleeman
02-20-2008, 04:09 PM
That guy's tutorials work great, but the problem is he uses clip events instead of referencing object from code in the frame...

ASWC
02-20-2008, 05:05 PM
it's not a problem, you can convert all that to timeline code in a second.

cdleeman
02-22-2008, 05:40 PM
You should't have to convert from a deprecated method to the 'right' method when following a tutorial that was put out for a recent version of flash.

ASWC
02-22-2008, 05:52 PM
I understand what you mean but it really doesn't bother me. What's important is to understand what's going on in the code so you can play with it the way you want. It's more of a problem if you plan on copying and pasting which is not the most efficient way to learn.

cdleeman
02-26-2008, 08:06 PM
Yes, but I guess my point is that if you're going to put yourself out there as a teacher of Flash, you should use timeline actionscript only. Any newbie who learns from this guys site is going to have to unlearn things later on. Especially if tackling AS3, where clip events are not even allowed. I'm not digging on the guys logic (his stuff works really well). Just surprises me that he wouldn't have an updated coding style.