View Single Post
  #21  
Old 11-17-2011, 11:18 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Tricxta View Post
You can invert the angle easily by doing

invertedangle=(angle+pi)%(pi*2)

as for the power, I would subtract a little from the initial collision. Then use the same direction formula you have already been given.
All you need to do is add pi to it, the sin and cos functions don't require it to be in [0, 2pi).
__________________
Reply With Quote