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
38
S
18
G
19
Posts: 664
Reputation: 14,107

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
69
S
10
G
9
Posts: 299
Reputation: 8,935

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
38
S
16
G
17
Posts: 2,230
Reputation: 17,220

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
38
S
18
G
19
Posts: 664
Reputation: 14,107

Post » Mon Nov 26, 2012 1:59 am

Check out this tutorial for more infos !
Linky Linky !Whiteclaws2012-11-26 02:00:37
B
38
S
16
G
17
Posts: 2,230
Reputation: 17,220


Return to How do I....?

Who is online

Users browsing this forum: Congrats2u, OddConfection, RetroSpock, TheGreatAdam12 and 10 guests