Author Topic: Bouncing Angle  (Read 4868 times)

mccool

  • Regular
  • **
  • Posts: 48
  • That's like trying to eat a burrito with no fork!
    • View Profile
Bouncing Angle
« on: 2006-07-02, 02:42:13 PM »
I want to make a breakout style game. i need the ball to bounce at a certain angle when it hits a wall or my little platform thingy. How can i do that?
Old Skool!

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: Bouncing Angle
« Reply #1 on: 2006-07-02, 05:06:48 PM »
You would have to write a script to run during OnBeforeSpriteMove and call ReactToSolid and bHitSolid then set the x and y velocity based on the direction you want it to bounce.
Edward Dassmesser

Jam0864

  • Contributor
  • Fanatic
  • **
  • Posts: 744
    • MSN Messenger - marmalade0864@hotmail.com
    • View Profile
    • Jam0864's Content Dump
    • Email
Re: Bouncing Angle
« Reply #2 on: 2006-08-10, 01:58:44 AM »
i think you could make the walls sprites and make it so when ball (class A) hits wall (class B) B repels A meaning ball bounces off walls not sure it would be at the right angle though