Ball physics

Get help using Construct 2

Post » Mon Nov 26, 2012 12:01 am

I have a tank that shoots a missle from the assets I got from scirra. But when the tank shoots it goes crazy at different angles each time. I tried messing around with the physics but no luck. I need it to shoot at different angles with the turret,only 3 angles, it it needs to go up, come down and explode, taking out a brick when it explodes.

Any help would be greatly appreciated. I'm starting to get a bit frustrated.
B
31
S
16
G
11
Posts: 449
Reputation: 9,719

Post » Mon Nov 26, 2012 12:06 am

Using the physics behaviour when you're new to C2 or creating game logic can be tricky at first. When I need something that obeys gravity, but is easy to control and predict, I like to use the Platform behaviour, and have the object "jump" towards my target as soon as it's been spawned. That can be a little tricky to get working too, if you're really new, but it's still simpler than using the physics behaviour imo
B
64
S
8
G
9
Posts: 290
Reputation: 8,590

Post » Mon Nov 26, 2012 12:14 am

Even if the physics behavior is a little tricky , it's potential is huge !
In your case , You shoudn't use the physics behavior with the turret ( You don't want the turret to be affected by the gravity ) , the bullet is the one that is affected by gravity .If you are wondering how to make it look real , Just copy the ghost shooter example , Spawn a bullet and give it an impulse with angle as the turret's angle !

That should do the job !

Cheers
B
35
S
16
G
16
Posts: 2,222
Reputation: 16,589

Post » Mon Nov 26, 2012 1:06 am

Sorry if I don't understand. What did you mean by: give it an impulse?

Thanks again.
B
31
S
16
G
11
Posts: 449
Reputation: 9,719

Post » Mon Nov 26, 2012 1:59 am

Check out this tutorial for more infos !
Linky Linky !Whiteclaws2012-11-26 02:00:37
B
35
S
16
G
16
Posts: 2,222
Reputation: 16,589


Return to How do I....?

Who is online

Users browsing this forum: YoHoho and 13 guests