How do I make a physics object move forward constantly

Get help using Construct 2

Post » Thu Sep 18, 2014 1:53 am

I'm trying to replicate that sled game, the one where your santa guy or what have you is always moving and you have to create a line below him to keep him going. I'm having a problem figuring out how to get him to keep moving forward, while going faster on a down slope, and slower on an up slope (unless physics does that already, but how would I tweak that?)
B
6
S
1
Posts: 90
Reputation: 840

Post » Thu Sep 18, 2014 6:18 am

I'm not really familiar with Construct 2 physics just yet but have you tried tweaking the 'Friction'. Decrease friction on down slope and increase on up slope, or vice versa.
"The first principle of a free society is an untrammeled flow of words in an open forum." - Adlai E. Stevenson
B
13
S
1
Posts: 19
Reputation: 1,108

Post » Thu Sep 18, 2014 7:28 am

Maybe you can use the Apply force at angle action to always be pushing him along and get it to read the objects orientation ( is within angle or is between angle ) to either increase or decrease that force?
B
7
S
1
Posts: 61
Reputation: 567

Post » Fri Sep 19, 2014 12:02 am

I tried apply force ar angle and It failed, but only because I didn't know what angle to set it at. I think the friction thing will work though. I just don't know how to let it know it's going down a slope or up a slope.
B
6
S
1
Posts: 90
Reputation: 840

Post » Fri Sep 19, 2014 12:09 am

Well if it's any help, in Construct 0-degrees means something is pointing to the right, and then the degrees go upwards in a clockwise direction. So if you're traveling to the right, a number between 0 and 90 is going down, and a number from -270 to 0 is going up a slope.

In the Line Rider game you could also slide backwards, though, and it wouldn't change which way you were facing. In that case, traveling left while having an angle of -270 to 0 would still be on a downward slope!

So in that case, in your events you first need to determine if you are facing left or right, then you need to determine if you're MOVING left or right, and THEN you have to find the angle of the slope to figure out if he is going up or down a slope.

I'm new to construct myself, so this is the only thing that popped into my head, haha.
B
4
Posts: 8
Reputation: 216

Post » Fri Sep 19, 2014 6:50 am

Apply not force, but impulse to object.
B
5
S
1
Posts: 31
Reputation: 441

Post » Fri Sep 19, 2014 7:27 am

@Fonduede, explained what I was getting at perfectly, just remember that your initial apply impulse at angle option needs to be opposite to the direction you wish it to go ( you kick a football on the opposite side (the force applied) and it goes forwards )
B
7
S
1
Posts: 61
Reputation: 567


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 35 guests