# Help making an arcing projectile

Get help using Construct 2

### » Wed Nov 30, 2011 10:19 am

In simple terms: I need help crafting a formula to make an object fly from point A to point B in an arc, and point A and B won't be known ahead of time. And I have no idea how to get started.

I feel like there's a semi-simple solution using lerp, but I'm not familiar enough with it to figure it out. Is that the right way to go?
B
20
S
9
G
6
Posts: 607
Reputation: 6,112

### » Wed Nov 30, 2011 10:44 am

A simple way is to spawn a bullet object with gravity.
Scirra Founder
B
363
S
216
G
75
Posts: 23,122
Reputation: 180,543

### » Wed Nov 30, 2011 10:47 am

Well, to be more specific in my idea... It's a throwing weapon for the player, where you press space and the character automatically throws it at the nearest enemy (in an arc of course). It would have to ALWAYS hit point B, provided the path is clear, so gravity isn't quite what I'm looking for. Do you know what I mean?
B
20
S
9
G
6
Posts: 607
Reputation: 6,112

### » Wed Nov 30, 2011 11:14 am

If both the player and the target can move, the math is surprisingly complicated. It's probably easier to try to 'guide' the weapon with a 'rotate towards position' or similar.
Scirra Founder
B
363
S
216
G
75
Posts: 23,122
Reputation: 180,543

### » Wed Nov 30, 2011 11:24 am

Yeahhh, I'll try to avoid the heavy math. Thanks for the tips Ashley.
B
20
S
9
G
6
Posts: 607
Reputation: 6,112

### » Wed Nov 30, 2011 3:04 pm

quatratic function is what your looking for i think

there are some post on it in classic, but i also think there where extra expressions for it in classic
B
61
S
19
G
6
Posts: 810
Reputation: 9,037

### » Fri May 24, 2013 9:18 am

In bullet behavior there is no gravity ? How can I add it ?

Im using classic.
B
5
S
1
Posts: 20
Reputation: 690