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

How to make X push Y while avoiding Y from pushing back X?

Topics: Developer Forum, User Forum
Jan 21, 2012 at 4:02 PM
Edited Jan 21, 2012 at 6:27 PM

Hi guyz,

Let's say I have two objects: X and Y.

I'd like to find a way for X to be able to affect Y without Y affecting back X. In other words, when X push on Y, Y moves, but X isn't slowed down by Y.

My goal with this is to have a layer of visual effects that are affected by the gameplay without having the visual affecting back the gameplay.

Any suggestions on how to do this?




Edit: Thinking a bit more about it, it's like a reverse kinematic... 

Jan 22, 2012 at 12:28 AM
Edited Jan 22, 2012 at 12:28 AM

How about in PostSolve() you apply to X an impulse opposite to the one produced by the collision response so they cancel each other.

Jan 22, 2012 at 3:24 PM

I'm not familiar with that part of the code but I wonder if it wouldn't better to just figure out a way to skip the first collision response. I'll play around with it, thanks for the suggestion.