JUMP STOP BOUNCING! grrrr...

ChipmunkGamesChipmunkGames Member Posts: 106
edited November -1 in Working with GS (Mac)
Hey guys, i tried to make my guy jump. when he does he bounces off the ground! How do i fix this? I've already set density, friction, and restitution to 0.

Here's the script so far:

Bounce when colliding with platform

Rule
When key up is down
for 0.1 seconds (run to completion checked) Accelerate 90 degrease at speed 5000

Comments

  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    Newton's Third Law: To every action there is always an equal and opposite reaction: or the forces of two bodies on each other are always equal and are directed in opposite directions.

    Make sure both actors have restitution = 0.
  • ChipmunkGamesChipmunkGames Member Posts: 106
    CodeMonkey you are a [CENSORED] genius! Thank you!
  • ChipmunkGamesChipmunkGames Member Posts: 106
    Wait, but why does it sometimes jump higher than other times? (already checked the box 'run to completion')
  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    Timer is hard to get perfect. Its like taking a stopwatch and consistently start and stopping to always get exactly .1 to show.

    Try just changing the self.Motion.Linear Velocity.Y to some number. Gravity will take care of the rest.
  • DreamWorldDreamWorld Member Posts: 43
    The magic words:
    CodeMonkey said:
    Gravity will take care of the rest.

Sign In or Register to comment.