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

Topics: Developer Forum, User Forum
Developer
Jan 21, 2012 at 3:02 PM
Edited Jan 21, 2012 at 5: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?

 

Thanks

 

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

Jan 21, 2012 at 11:28 PM
Edited Jan 21, 2012 at 11:28 PM

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

Developer
Jan 22, 2012 at 2: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.