# Realistic parabolic arc (w/o physics object)

0 favourites
• 1 posts
From the Asset Store
Calculate parabolic trajectories and tween objects over them.
• Currently I have a throwing animation + spear-Bullet that works well enough.

But I can't get the arc to be correct. I have to simulate it by making the spear sprite rotate clockwise. The bullet sprite pretty much treats every sprite like its a uniform block or circle and there's no way to show where the 'weight' is, so it will just fly sideways.

But it still never looks natural because I guess, the gravity is relative to the bottom of the layout and not the nearest solid (i.e. the current 'ground').

The throwing shot is also a chargeable shot, for distance, so I have these equations to affect the bullet-Spear

...On Q release

Spear > Set Bullet speed to Throw_Time*400

Spear > Set Bullet acceleration to 800+(Throw_Time*400)

Spear > Set Bullet gravity to 5000-(Throw_Time*300)

Where Throw_Time is the time between Q pressed and released.

And for the fake rotation:

...System > Spear_Thrown = 0

.......Spear > Not Mirrored: Spear > Rotate 3 degrees clockwise

.......Spear > Mirrored: Spear > Rotate -3 degrees clockwise

Is there a way to calculate the nearest Solid object i.e. the current 'ground' and then make it calculate gravity in relation to it? The current fake rotation angle sometimes works smoothly, and sometimes doesn't.

I know Physics is an option, but I'm wary of making it a physics object because it has to interact with non-physics objects, and I think that doesn't work? I have a Player sprite and the spear is attached to the hand of it, wouldn't the player have to be made a physics object too?

I'm pretty far in, so I dunno if conversion to physics objects (plus because I have a lot of different image points) is a good idea :S

Edit: Would extremely high gravity + higher scaling bullet speed + acceleration work in the formula?

• ## Try Construct 3

Develop games in your browser. Powerful, performant & highly capable.

Construct 3 users don't see these ads
• 1 posts