Hello.
Tell me how to make the projectile take the angle of the flight trajectory?
Now the projectile flies out and starts to tumble.
Seems like you need to either increase the power, or decrease the gravity
The image of the projectile (the png or jpg) should be facing to the right. That is 0 degrees for GDevelop. I suspect the image is currently facing down.
Make sure the projectile image to faces to the right:
When you create the projectile, you aren’t rotating it to the angle of the gun.
Exactly.
I missed this point.
Corrected.
How can I now make it so that during the flight of the projectile it changes its angle as if it were flying along a parabola?
If you use physics, try applying the force at a point nearer the nose of the projectile and/or changing the centre of the mass to nearer the nose of the projectile…
How to apply force to an object at a specific point?
I moved the center point to the nose, the result did not change.
Maybe I’m doing something wrong.
I’d try the angle of Gun001.
Initially, it was so.
The angle of the projectile should change during the flight, and if it is equal to the angle of the gun, then it will be constant.
If you assign the angle of the gun, then the result is as in the video
It’s almost as if your physics object doesn’t have enough mass for the force applied. What does the physics shape look like?
I suggest you use the temporary image to alter the box to fit the projectile. Currently it will be the same shape as the image - a square which will include the white space around the projectile.
And in the standard sprite editing tab, create a new point nearer the tip of the projectile, and use that to apply the force.
Is the world gravity set to something other than 0?
To have the projectile show the angle of motion, make an action that sets the angle to Bull001.Physics2::LinearVelocityAngle()
I tried creating a bomb. Increasing the angular dampening helped. I set it to 10. It still didn’t have enough mass in the tip. Maybe, it needed a custom physics mask.
I ultimately set the angle to the direction of movement or force and that looked good to me. With multiple bombs you’d probably need a for each object.
That change angle is a non-physics action, will probably interfere with the physics engine’s computations and end up with some undesired results.
I think what the OP wants may be a bit too advanced for the physics engine.
I kind of wondered that myself. Could you apply angular physics forces to do the same?
IDK if you can change the center of gravity in any way other than changing the physics mask to add more mass to the tip.
I don’t think it would be smooth, and the projectile would probably appear to wobble as it overshoots the angle and corrects itself again.
I think the physics bodies have a uniformly spread mass. Maybe joining 2 physics bodies, one lighter than the other, might do the trick?