This project has moved and is read-only. For the latest updates, please go here.

Block Movement XNA

Topics: User Forum
Sep 27, 2013 at 4:39 PM
sorry if i repost i want to ask about how to stop an object if the object collide with another object

I've been looking in all the site but no response ..
what because I am new in XNA or I considered stupid by others

maybe if you could give an example of how to do it ..
sorry if my english mess
Sep 29, 2013 at 11:39 PM
Try using the OnCollision() event.

In the event you have access to variables usually called Fixure1 and Fixture2.

You can change the properties of the body through this.

For example

fixtureA.Body.LinearVelocity = Vector2.Zero;

Would stop fixture1's body from moving.

Have fun