Quote:
Originally Posted by Tricxta
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).