Physics door

This forum is currently in read-only mode.
From the Asset Store
The package contains 105 sounds This sound library is perfect for voicing mechanical doors in your Sci-Fi game.
  • Hey chaps.

    I am working on a top down game using physics.

    I am trying to make a 'Door', and am hoping someone has a good idea on how to control the physics objects.

    I have it set up as a hinge sprite and a door sprite currently(hinged), which works well for a free swinging door, but I do not know how to make specific control states, like a close/locked door.

    toggling the 'immovable' option breaks hinges.

    <img src="http://dl.dropbox.com/u/1487524/Scirra/PhysicsDoor.png" border="0" />

    This is the current set up, the red base is the hinge sprite, the green sprite is the door and the orange sprites are walls. I have created a small orange sprite as a sort of door stop to limit the angle range.

    Anyone have any ideas on how to make something like this?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Put a Spring on the other side of the door, connected to the wall and increase the spring constant (k) whenever you need the door to "lock".

    For checking if the door is locked , you can simply check the value of the constant. A nice side effect is that, at lower values, you'll get an auto-close door.

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