React to physics collisions before the physics system does?

Post » Thu Jul 27, 2017 6:42 pm

Hi, I have a situation where I'm using physics to move things around, but I'd like to be able to react to collisions before the physics system does. So for example, Ball object strikes Wall object. If Ball.Speed > 100, destroy Wall, and Ball keeps going in the same direction, otherwise let the physics do its thing.

It seems that by the time you get the collision event from the physics system, it has also handled the collision itself and changed the velocities of the impacted objects. That makes sense, just wondering if anyone can think of a way around this. Thanks!
B
41
S
13
G
2
Posts: 49
Reputation: 4,215

Post » Fri Jul 28, 2017 10:26 pm

https://www.dropbox.com/s/zk61f482bsxsj ... .capx?dl=0

It is maybe to exact for your device. Maybe have to add a pixel or two to the offset.
Under my dt environment it is almost pixel perfect.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950


Return to General Discussion

Who is online

Users browsing this forum: NetOne and 1 guest