Question! Need Help!
minemaster654321
Member Posts: 3
Hi, in my game, your a platform that you move left and right while keeping balls that are bouncing on you, from falling below your platform. I want the balls to act like the "ball" in the game Pong (Atari) where the balls bounce off the platform and go in a random direction depending where the ball bounced off the platform. any ideas on how I could make this happen?
Answers
not sure it will work, but you can
try to record the angle of falling ball when it goes down
if
( this.motion.linearVelocity.Y < 0)
then
set varAngle = [formula to detect angle]
then, when touching platform, set ball's velocity angle to opposite value (that you recorded in varAngle)
goodLuck
Yops – the innovative puzzle game for iOs – http://apple.co/1ESvIlC
Other games - http://appstore.com/flashpromllc/
How does the interaction with the platform influence the 'random' direction ?
This will make the ball bounce like normal, for this you may as well use the built in physics.
Like in Pong, the ball would ricochet of the platform and bounce off. Let's say the ball hit the left side of the platform, the ball would bounce to the left and same for the right
Basically, the ball will go in a direction depending on where it hits on the platform