Alice Community  

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

Reply
 
Thread Tools Display Modes
How to input angle of reflection
Old
stacon0851
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
Old
zero00
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: http://www.alice.org/community/showt...highlight=pool

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: http://www.alice.org/community/showthread.php?t=6291
Health Bars: http://www.alice.org/community/showthread.php?p=36968#post36968
Sky Warrior: Dual Force: http://www.alice.org/community/showthread.php?t=7174

Want to make your own space game? http://www.alice.org/community/showthread.php?t=6389
   
Reply With Quote
Old
HorusLupercal
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
Reply

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.