I am building a game within a game engine. The game is a 2D platform, where the player can move left, right, and jump/fall down. Part of the game is the presence of physical projectiles falling from the 'sky'. When these objects are created (in the sky), impulse is applied to them toward the present location of the player [Pic 1]. Please note the impulse is applied one time using the location of the player at object location, it is not constantly being applied to the location of the moving player. The projectile should move toward that location of the player, not necessarily to the location - and it does - but as it reaches its destination the object starts to curl upward [Pic 2].
I have tried several formulas for setting the angle on each tick (every frame), namely
Set Angle Toward: PlayerWasAtX, LayoutHeight Set Angle Toward: Self.X, LayoutHeight Set Angle Toward: If (Self.X > Self.PlayerWasAtX) Then (Self.X - PlayerWasAtX) / 2 Else (PlayerWasAtX - Self.X) / 2 , LayoutHeight
PlayerWasAtX is the stored location of the player upon projectile creation,
LayoutHeight is the total height of the canvas, and
Self.X is the X-coordinate of the projetile.
In those examples, example 1 would curl, example 2 would keep the object straight down at all times even when falling at a curve, and iirc example 2 just acted wacky.. or it acted the same as example 1.
Any help would be appreciated. Here are my reference pictures: