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

Just started using Construct 2? Post your questions here

### » Tue Feb 16, 2016 7:45 pm

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.
B
13
S
1
Posts: 63
Reputation: 719

### » Wed Feb 17, 2016 10:47 pm

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

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

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.
B
57
S
28
G
115
Posts: 1,712
Reputation: 65,172

### » Thu Feb 18, 2016 12:52 am

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

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

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?
B
13
S
1
Posts: 63
Reputation: 719

### » Thu Feb 18, 2016 12:58 am

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.
B
57
S
28
G
115
Posts: 1,712
Reputation: 65,172

### » Tue Feb 23, 2016 1:21 am

oosyrag wrote: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...
B
13
S
1
Posts: 63
Reputation: 719