Arcing Projectile

Get help using Construct 2

Post » Thu Jul 05, 2012 10:15 pm

I have been scouring the forums and tutorials but have not found a way to make a projectile, eg. boulder, arrows, etc. fly with an arcing motion instead of the bullet motion.

Does anyone know a behavior that does this or is it in the physics?
B
12
S
1
G
1
Posts: 50
Reputation: 1,228

Post » Thu Jul 05, 2012 11:15 pm

You could use physics or you can set the gravity of an object with bullet behavior.
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Thu Jul 05, 2012 11:54 pm

Even in a 3D Isometric view? I will post my example CAPX.

When you run it..

Click on the circular build spots to build towers.

The enemy will throw a boulder at a certain ActionPoint on their path.

That BOULDER is the item that I would like to see arc.

I will try the physics right now and see what happens.

Thanks.

https://docs.google.com/open?id=0B5puA55FudSeYmp1R1VtVV8wa0E
B
12
S
1
G
1
Posts: 50
Reputation: 1,228

Post » Fri Jul 06, 2012 6:37 pm

B
79
S
24
G
54
Posts: 4,750
Reputation: 40,763

Post » Fri Jul 06, 2012 6:45 pm

oh, it's great @R0J0hound , anyway, onemore thing i want to ask you here, what about when i hold down the left mouse, the longer i hold, the farther (distance) the Projectile and shadow travel . :D farsmile902012-07-06 19:15:34
B
50
S
12
G
7
Posts: 259
Reputation: 10,371

Post » Fri Jul 06, 2012 8:33 pm

Use a variable as a charge-timer when mouse button is down, then set the bullet speed of the shadow object to the variable when mouse is released:

topview_projectile_charge.capx (r98)
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Fri Jul 06, 2012 9:40 pm

If possible, think about the arrow like it having a shadow.

The distance between the arrow and the shadow is his height, so, to shot the arrow, it will have a arching trajectory, right?

Now, you'll need a math of this trajectory, the arrow will have mass and gravity, so, depending of the angle you shot your arrow, you'll need this math or something like it:











I did an arrow arching for a old RPG game have about 4 years, and what I remember is that I did an invisible shadow, who give the real trajectory and speed of the arrow, and an arrow flying, going up and falling relatively to the shadow.
ImageImageImageImageImageImage
B
93
S
20
G
13
Posts: 1,215
Reputation: 18,990

Post » Sat Jul 07, 2012 4:00 am

thank @Nimtrix, it's work .
B
50
S
12
G
7
Posts: 259
Reputation: 10,371

Post » Tue Apr 23, 2013 6:43 pm

@R0J0hound @Nimtrix this is awesome!! just what I was trying to do, thanks!!
B
3
Posts: 3
Reputation: 206

Post » Mon May 11, 2015 8:33 am

Great example! Is it possible to drop the bullet at mouse click coordinates?
B
12
S
1
Posts: 37
Reputation: 526

Next

Return to How do I....?

Who is online

Users browsing this forum: Nifl and 26 guests