I want to make a sling shot mechanic like angry birds or Jump Knight where i pull the mouse in a direction and the character will be thrown to the other direction - the speed and angle depending upon how much i drag and in what opposite angle respectively. Help would he greatly appreciated.
Hope this can help you. You can watch his channel for more of the mechanic that you want to achieve in your game.
this doesn’t help much. I have seen this already. The object moves to the same direction it is dragged. I want a sling shot mechanic where the force will be to the opposite direction of the pull. In this case my character doesn’t need to rotate. it has fixed rotation hence torque will not work.
Here’s one of the physics example projects, I went to the distance joint, set one of the objects as static and set Frequency to 4.
Pull the other object and release.
If you delete the joint a bit after the release, you should get a nice slingshot.
So instead of applying the force at the angle from object to the touch/mouse position, apply the force in the opposite direction (angle + 180) or apply a negative force. Then it will go in the opposite direction.
@MrMen have tried this already. Doesn’t seem to work in the latest version of gdevelop. In the older version, the base thing works but my player has fixed rotation. Applying the same doesn’t make the player move at all.
I see. You have applied a for to angle position. I did what the video said - applied torque. And since my player has fixed rotation, it did not work. I will try this with my scene. Thanks