How do I get my physics ball to roll up hills/inclines...

0 favourites
  • 5 posts
From the Asset Store
Complete game or template for a hill climb racing model.
  • Faster? I'm using the Physics behavior to move the Ball around in my game (it's a game similar to Red Ball on Mobile).

    It moves rather well, but when it comes to getting it to move up certain hill/incline type ground tiles, it slows the ball (just like in real life I guess) down and makes it difficult to roll the ball up the hill.

    I'm rather new to the whole using physics in games, so should I add some kinda acceleration action code block to it (to make to move faster)?

    If you need a capx, lemme kno.

  • If you want it to go uphill, you'll need to either add force or impulse.

    https://www.scirra.com/manual/98/physics

    [quote:3d57i5m2]Apply force

    Apply force at angle

    Apply force towards position

    Apply a force on the object, either at an angle, towards a position, or with custom X and Y axis forces. Applying a force causes the object to accelerate in the direction of the force. Forces can be applied from an image point or the object's origin.

    Apply impulse

    Apply impulse at angle

    Apply impulse towards position

    Apply an impulse on the object, either at an angle, towards a position, or with custom X and Y axis impulses. Applying an impulse simulates the object being struck, e.g. hit by a bat. Impulses can be applied from an image point or the object's origin.

  • If you want it to go uphill, you'll need to either add force or impulse.

    https://www.scirra.com/manual/98/physics

    [quote:2s8wbbne]Apply force

    Apply force at angle

    Apply force towards position

    Apply a force on the object, either at an angle, towards a position, or with custom X and Y axis forces. Applying a force causes the object to accelerate in the direction of the force. Forces can be applied from an image point or the object's origin.

    Apply impulse

    Apply impulse at angle

    Apply impulse towards position

    Apply an impulse on the object, either at an angle, towards a position, or with custom X and Y axis impulses. Applying an impulse simulates the object being struck, e.g. hit by a bat. Impulses can be applied from an image point or the object's origin.

    Thanks...any one in particular? I use 'Force' action for my normal movements. And where would you apply said forces? on the Ball or on the Tile surface?

  • It would be hard for me to give a specific answer without seeing your situation. The answer would be use the one that best fits your needs!

    You said you were already using force for your normal movements. I assume you would apply them on the ball. Either apply more in the same direction you already are applying for when you're going uphill, or maybe apply at an angle depending on the slope of your hill to be more efficient.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It would be hard for me to give a specific answer without seeing your situation. The answer would be use the one that best fits your needs!

    You said you were already using force for your normal movements. I assume you would apply them on the ball. Either apply more in the same direction you already are applying for when you're going uphill, or maybe apply at an angle depending on the slope of your hill to be more efficient.

    Ok, been busy, but I will try to post a demo soon...

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