Altering collision response

Here's the place to get help and discuss features. The focus is on the C++ version, but generic questions are welcome.
noon
Posts: 28
Joined: Fri Sep 10, 2010 5:38 pm

Altering collision response

Postby noon » Wed May 17, 2017 8:37 am

Hello,

I wonder if it is possible using the Presolve callback to change the way the collision responses are handled.
The goal would be to mimic the physic forces between a person and a train wagon:

- When outside the wagon, the person can move the wagon by applying forces to it by pushing the wagon's walls. (the person uses the friction force of his feet with the ground)
- When inside the wagon, the person cannot move the wagon by apply forces to it by pushing wagon's walls. Also the person can move inside the wagon and will inherit the wagon velocity.

This is my current setup :
- the character is a circle
- the wagon has 6 walls to be able to have 2 entrances
- there is a sensor to detect if the character is inside the wagon
Image

Currently if the character collides the wagon from inside or outside the wagon will be moved.
So how can I prevent the character to move the wagon when inside ?

Thanks!

Return to “General Discussion”



Who is online

Users browsing this forum: Google [Bot] and 1 guest