Elastic Collision

Get help using Construct 2

Post » Wed Mar 13, 2013 2:05 pm

Here's an updated version of the .capx that features a text overlay showing the enemy and player forces applied upon a collision.

ImpulseCollision.capx

I'm starting to wonder if the physics library is bugged. Sometimes the force seems to be applied and the objects 'bounce' off each other, other times literally nothing happens and another collision happens between the two because neither has moved.
Project Lead of Zems Online Card Game

Producer at Impulse Limited
B
18
S
6
G
3
Posts: 677
Reputation: 5,194

Post » Wed Mar 13, 2013 6:36 pm

You should move physics objects with the the physics actions (apply force/impulse/torque). It's generally a bad idea to mix physics with the other movement behaviors. It can mess up the physics simulation.

[quote=https://www.scirra.com/manual/98/physics]The Physics behavior simulates physics separately to the Construct 2 layout. Construct 2 will try to keep the Physics and Construct 2 "worlds" synchronised if one changes but not the other, but this can be unpredictable. For example, setting an object's position or angle will cause Construct 2 to teleport the corresponding object in the physics simulation to the object's new position, which does not always properly take in to account collisions. The same is true of using other Construct 2 behaviors at the same time as Physics.
[/quote]
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,000

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 26 guests