How do I Make Top-Down Physics?

Get help using Construct 2

Post » Wed Jul 13, 2016 7:00 pm

Hi, i'm trying to make a GTA-Hotline Miami Open World Game and I Need Top-Down Physics. Sort of Like


I Crash into garbage cans with my car. I want those garbage cans to slide on the ground and stop. I have something like it already with setting the physics gravity to 0 But that makes the Garbage Cans move Forever. Same thing with dead bodies.


I want something like this


https://gyazo.com/312272cdf0172d3ef3247375345b9740

Help?

Thanks! :) ;)
B
25
S
8
Posts: 35
Reputation: 1,649

Post » Wed Jul 13, 2016 8:42 pm

I believe you'll want to increase the linear damping property of the physics behavior.
Mistakes were made.
B
54
S
28
G
115
Posts: 1,705
Reputation: 65,083

Post » Wed Jul 13, 2016 8:49 pm

oosyrag wrote:I believe you'll want to increase the linear damping property of the physics behavior.


Thanks! I'll Try that!
B
25
S
8
Posts: 35
Reputation: 1,649

Post » Wed Jul 13, 2016 8:51 pm

oosyrag wrote:I believe you'll want to increase the linear damping property of the physics behavior.

It Just Sinks to the bottom of the game...
B
25
S
8
Posts: 35
Reputation: 1,649

Post » Wed Jul 13, 2016 9:00 pm

You could make the carbage cans use bullet behaviour instead. On collision you have them shoot away on impact in the direction you want. Set speed 0, set bounce off targets to yes, no gravity. and set acceleration to -2000 or something. On colission you set the speed of the bullet to same speed as the car+a bit extra.

I think it could work something like that.
Follow my progress on Twitter
or in this thread Archer Devlog
B
42
S
18
G
19
Posts: 1,060
Reputation: 14,054

Post » Wed Jul 13, 2016 9:04 pm

Sinking to the bottom is probably gravity?
Mistakes were made.
B
54
S
28
G
115
Posts: 1,705
Reputation: 65,083

Post » Wed Jul 13, 2016 9:07 pm

tunepunk wrote:You could make the carbage cans use bullet behaviour instead. On collision you have them shoot away on impact in the direction you want. Set speed 0, set bounce off targets to yes, no gravity. and set acceleration to -2000 or something. On colission you set the speed of the bullet to same speed as the car+a bit extra.

I think it could work something like that.


Alright, I'll test that! :)
B
25
S
8
Posts: 35
Reputation: 1,649

Post » Wed Jul 13, 2016 9:12 pm

datiel12 wrote:
tunepunk wrote:You could make the carbage cans use bullet behaviour instead. On collision you have them shoot away on impact in the direction you want. Set speed 0, set bounce off targets to yes, no gravity. and set acceleration to -2000 or something. On colission you set the speed of the bullet to same speed as the car+a bit extra.

I think it could work something like that.


Alright, I'll test that! :)



Cool! its Pretty Close to What i wanted! Thanks to both of you guys! :) :)

Just one problem. It only has an impulse from one direction. How do i get it to have impulse from where ever the car hit the object?
B
25
S
8
Posts: 35
Reputation: 1,649

Post » Wed Jul 13, 2016 9:33 pm

Try angle(car.x,car.y,object.x,object.y) to get the angle between the car and object, and apply the impulse at the same angle.
Mistakes were made.
B
54
S
28
G
115
Posts: 1,705
Reputation: 65,083

Post » Wed Jul 13, 2016 9:35 pm

I thought the bullet would bounce in the right direction.
try use ..on collision, bounce off object. it might work
otherwize you could try set bullet angle to same as cars direction of motion.

set bullet angle of motion to: Sprite.Car.MovingAngle
Follow my progress on Twitter
or in this thread Archer Devlog
B
42
S
18
G
19
Posts: 1,060
Reputation: 14,054

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 26 guests