Physics iterations / Stop physics

0 favourites
  • 4 posts
From the Asset Store
Simple yet very life-like rag doll made with Physics!
  • Is settings Gravity to 0 and both iterations to 0 the same as disabling physics? I need to disable the physics of my game, but not the joints, how can I do it? I'm not getting my expected results

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don't think that setting the physics iterations to 0 will have the desired outcome.

    There may be a better way to do this but I would put my physics objects into one family that has the physics behavior to keep things simple. I would also give the family 3 variables - let's call them X_vel, Y_vel and rot_vel.

    Then, on the pseudo stop physics command I would do the following (aside from gravity = 0):

    for Each Family:

         Family.X_vel = Family.Physics.VelocityX

         Family.Y_vel = Family.Physics.VelocityY

         Family.rot_vel = Family.Physics.AngularVelocity

         Family : set velocity = 0

         Family : set angular velocity = 0

    I believe that things could still bump into each other if you move them while they're paused like this, but if the scene is static then this should work (works for a Pause function as well). Then, on resume physics (gravity = 10): for each Family set angular velocity to rot_vel and the x and y components of the linear velocity to X_vel and Y_vel.

  • Here's a quick demo capx for you!

  • Thanks Colludium, it worked, I also disabled collision between the family objects while paused so I can drag it without colliding with something.

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