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

[Solved] Can I make some collisions to contact only not bounce?

Topics: Developer Forum, Project Management Forum, User Forum
Nov 7, 2012 at 11:13 PM
Edited Nov 8, 2012 at 3:21 AM


I have a question about collision.


I want to some collisions to make contact only, not bounce others.

They can coinside but nudge.

However occur 'BeginContact' and 'EndContact'.


I tried to set 'collision category' and 'collision with' property

but result was not I want.


Is threre any way to solve this problem?

Thanks. :)

Nov 8, 2012 at 1:30 AM

Set the restituion of 'nonbouncy' things to 0

Nov 8, 2012 at 2:31 AM
fnorder wrote:

Set the restituion of 'nonbouncy' things to 0

It can make 'no bounce' but 'coinside'.

I want to make coinside each other and contact.

Nov 9, 2012 at 1:26 AM

I'm not sure I understand you correctly, but you want some objects that does not react to others?

I will explain a few different types of bodies, and perhaps one of them will fit your needs.

Static bodies: Setting Body.BodyType to BodyType.Static will make the body not move on impacts. Other bodies will react to it, but the static body will never react.

Kinematic bodies: You can also set the body type to BodyType.Kinematic, this will make the body moveable, but it will never react to other bodies impact.

Sensor bodies: Set Body.IsSensor to true, and it will be like a ghost body that only detect collisions. It will never react to other bodies, and other bodies will not react to it. However, you will still be able to detect collisions inside the sensor.

Nov 9, 2012 at 4:49 AM

Sensor Body is the property you are looking for your object.

Nov 9, 2012 at 8:03 AM

Thanks for answers.

Sensor body is what I wanted.

Apr 25, 2013 at 6:21 AM
Edited Apr 26, 2013 at 9:10 AM
I got it.