Changing direction of an object

Topics: User Forum
Sep 25, 2011 at 3:40 PM

Hi, i've been working on a project and need some help. I'm trying to get an object to get a "inversed" direction when it hits the walls or the platform which you control. I linked a picture demonstrating what I want it to do at the bottom.

Is there anyone who has any tips on how this can be done? Right now it can come in from say the left and then bounces straight up with a 90 degree angle to the object.

I cannot find anything in the documentation about how this might be handled.

Sorry if this is a stupid question but I'm new to programming :) Grateful for all help!


How i want it to act:


Sep 26, 2011 at 11:29 AM
Edited Sep 26, 2011 at 11:30 AM

first of all use vectors instead of angles and power (if you don't allready do that).

your inverse is very easy to do and i don't think you need farseer for that.

if your are making something like pong you just need to inverse the X or Y value of the ball to make him bounce.