Physics random collision issue

0 favourites
  • 4 posts
From the Asset Store
Particles support animations, collisions, effects and etc.
  • Hi,

    There is a random collision issue when using Physics.

    The collision is not working at random instances. I have tried all options but no luck.

    version: r368.2 stable

    Physics random collision issue (Recorded video)

    1drv.ms/v/s!AlGba7Q7e8ArwjVd16cMTtxF8Fum

    C3 file:

    1drv.ms/u/s!AlGba7Q7e8ArwjYVe3YADsU04R0d

    Is there any setting to prevent this?

    Thanks

  • I used the inspector to determine that the balls that get stuck were asleep. Not sure why the engine did that though. Found this post that suggests you can check if an object's asleep and apply a force of 0 to wake it up.

    construct.net/en/forum/construct-2/how-do-i-18/prevent-physics-object-104541

    I've also noticed some physics objects occasionally sticking in one of my own projects - so will check if they too have gone to sleep and will try to fix similarly.

  • I used the inspector to determine that the balls that get stuck were asleep. Not sure why the engine did that though. Found this post that suggests you can check if an object's asleep and apply a force of 0 to wake it up.

    https://www.construct.net/en/forum/construct-2/how-do-i-18/prevent-physics-object-104541

    I've also noticed some physics objects occasionally sticking in one of my own projects - so will check if they too have gone to sleep and will try to fix similarly.

    In the case of the topik strategist he has balls falling on a plane that is not movable according to physical laws, that's why some of them stop and fall asleep to save resources.

    He moves these platforms not by physical means, but through sine.

    You can tilt them by a small degree then the physical engine will not think that the ball has stopped and when the platform moves away from the action of the non-physical sine, the ball will be in motion.

    You can also increase the bounciness of the ball and it will bounce longer and when the platform leaves it will not sleep.

    When you mix physics with non-physics, you need to be careful.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Fixed my issue by applying a zero force if the object is sleeping. This first appeared when I started my current project in C2 years ago. Thought C3 had fixed it, but not completely. Fixed now though - I'm delighted!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)