Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Thread Tools Display Modes
How to input angle of reflection
Junior Member
Status: Offline
Posts: 1
Join Date: Apr 2012
Default How to input angle of reflection - 04-27-2012, 12:45 PM

Im making a brick breaker game and i need to know how i can get the ball to collide with the wall and bounce off at the angle of reflection and continue in the direction it bounced off. If anyone can help me with this problem it would be greatly appreciated.
Reply With Quote
Senior Member
zero00's Avatar
Status: Offline
Posts: 300
Join Date: Oct 2009
Default 04-28-2012, 08:33 AM

Perhaps this pool game can help:

I went about this by making a ball switch directions if it got close enough to the edge of the screen.

==============Some of my Games and Ideas===========

Sky Warrior:
Health Bars:
Sky Warrior: Dual Force:

Want to make your own space game?
Reply With Quote
Junior Member
Status: Offline
Posts: 7
Join Date: Apr 2012
Location: Mwhahaha right.
Default 04-30-2012, 04:24 PM

Could you set it up as an equation where the ball moves away from the wall at outgoing angle == incoming anglex2 asSeenBy the wall?
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.