>I think what you want to do is store the incoming angle of the ball as
>separate X and Y vectors. the caluclation of a 'bounce' off eny
>flatsurface is then
>
>newX = oldY
>newY = oldX
%<snip----------
>Is this what you wanted ?

Not quite: bouncing off flat (right angled) surfaces is easy (eg: hVelocity
* - 1); however when the ball hits a sloped wall the calculation is not so
simple.
* I use the horizontal & vertical velocities (vectors) to move the round
ball;
* I have the angle of the wall (rise / run)
* Collisions are perfectly inelastic;

      ^
       .     /
        .   /=
         . /==
        . /===
      .  /====
    .   /=====
   ^   /======

> An example of what I am trying to achieve can be found at:
> http://www.chnexus.com/paths/v-path.htm
> (Awesome physics simulation stuff here)

Thanks,

Tom.



[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to