-
HELP!! Pinball game
Can anyone help me make a pinball game? I need help making a ball bounce and come off objects at the correct angle.
-
That is one really big project. I suggest using a pre-built physics engine.
Flade is probbably the only one you can use since most are in AS 3.0.
The greatest pleasure in life is doing what people say you cannot do.
- Walter Bagehot
The height of cleverness is to be able to conceal it.
- Francois de La Rochefoucauld
-
for the hittest detection in a ball
you must
ps. the point in the ball must be in the center
detect=(floor.hittest(ball._x+ball.width*0.5,ball. _y,true))||(floor.hittest(ball._x-ball.width*0.5,ball._y,true))||(floor.hittest(ball ._y+ball.height*0.5,ball._x,true))||(floor.hittest (ball._y-ball.height*0.5,ball._x,true))
if(detect){
//invert speeds of the ball
}
of course floor is the object
ps- don`t forget the ball always goes down
-
What if the floor is angled and the ball falls onto it it shouldnt bounce back up it should bounce the angle oppisit of the angle between its motion and the tangent of the surface
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|