A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: HELP!! Pinball game

  1. #1
    Junior Member
    Join Date
    Feb 2007
    Posts
    1

    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.

  2. #2
    Knows where you live
    Join Date
    Oct 2004
    Posts
    944
    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

  3. #3
    Banned
    Join Date
    Dec 2006
    Posts
    43
    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

  4. #4
    Junior Member
    Join Date
    Sep 2005
    Posts
    15
    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center