How do I...Create a SeeSaw-like object?

0 favourites
  • 8 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • I didn't know how to create it, but the logic maybe like this..

    1. If there's an object on the SeeSaw board on the left side, the seesaw-board's angle will be increased.

    2. If the object on the right side, the seesaw-board's angle will be decreased.

    3. If the object not on the seesaw board, the seesaw-board's angle will be turn back to it's normal condition.

    <img src="http://s20.postimg.org/cqu5akiil/image.jpg" border="0" />

    <img src="http://s20.postimg.org/wk6939vwd/image.jpg" border="0" />

    Anyone can help me?

    Thanks and sorry for my bad english.

  • Have you tried the Physics Object?

  • Have you tried the Physics Object?

    Mmm..nevermind. How to do it?

    Because if using physic, how to revert back the seesaw board to the normal condition?

    Thank you for your reply...

  • click to drag boxes

    preview

    seesaw returns to its normal position with 'apply torque towards angle', with a torque force that is proportional to the angle difference (otherwise it will vibrate back and forth)

    i dont think you need to make the force proportional though.. you could just try setting the angular damping very high

    capx

  • click to drag boxes

    preview

    seesaw returns to its normal position with 'apply torque towards angle', with a torque force that is proportional to the angle difference (otherwise it will vibrate back and forth)

    i dont think you need to make the force proportional though.. you could just try setting the angular damping very high

    capx

    Beautiful!

  • click to drag boxes

    https://dl.dropboxusercontent.com/u/53374990/Forum/seesaw/index.html : preview

    seesaw returns to its normal position with 'apply torque towards angle', with a torque force that is proportional to the angle difference (otherwise it will vibrate back and forth)

    i dont think you need to make the force proportional though.. you could just try setting the angular damping very high

    https://dl.dropboxusercontent.com/u/53374990/Forum/seesaw/seesaw.capx : capx

    Beautiful!

    Yeah,agree that, beautiful example! Thanks for your help keepee & LittleStain .

    And another question, how to implement it to platformer behaviour?

    I've add a sprite called player, give it platform and physic behaviou but it give weird result.

    dropbox.com/s/0b8rnlo9ye48sl1/seesaw.capx

    Many many thanks <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Physics doesn't like working with other methods of moving an object (the player).

    Haven't got time to check your capx right now, but off the top of my head, just assign Physics behaviour to the player (no platform behaviour). Then you'll need to hardcode events for movement. Easy enough to do.. for instance, to jump with space bar..

    + On Key Pressed (SPACEBAR)

    • Apply Impulse At Angle 270

    (you'll have to play around with force until it feels right for you)

    For moving..

    + On Key Down (LEFT_ARROW)

    • Apply Force At Angle 180

    (Force will be much smaller than impulse because it updates Force every tick, whereas impulse is a one shot deal, hence why it's suitable for jumping)

    and so on.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Physics doesn't like working with other methods of moving an object (the player).

    Haven't got time to check your capx right now, but off the top of my head, just assign Physics behaviour to the player (no platform behaviour). Then you'll need to hardcode events for movement. Easy enough to do.. for instance, to jump with space bar..

    (...)

    But I need the platform behaviour, for the state when the object is landed on the floor, is moving, is falling, and so on.

    But I had trying your idea but there's some problem. When the object is moving the object is rolling, can't standing.

    Btw, thanks for your help <img src="smileys/smiley1.gif" border="0" align="middle" />

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