@iOSxcOder A helpful answer might depend on whether this was 2D or 3D, but in general it’s important to understand that physics bodies like RigidBody2D can be moved by the physics simulation, and the simulation will take care of trajectory. So, get the arrow in the scene and send it!
Reparenting the arrow to a static object like a tree is what I would do to make it “stick”. If the arrow lands on the ground, it will not move unless acted upon (Newton’s first law of motion).
If the damage the arrow causes is dynamic based on the arrow’s speed, use the speed of the arrow as a multiplier when calculating the damage. Damage being dependent on distance is an interesting question to me… it can be calculated, but does it need to be calculated by you?
Your questions give me a new one: does the Godot physics simulation manage things like a body’s change in momentum (ex. the force of an arrow diminishing over distance)?
For your question, you can just hack it by changing the project settings gravity to have an x component.
Or you can assign a physics material to your “environment” to simulate air resistance or whatever you’d like. I don’t know how to do that but I’ve read something along the lines of this on the forum before.
I’m interested in this momentum as this could be useful for other things then arrow - spears , throw knife , projectiles, darts , ball launched by cannon, catapult , thrown by giants etc.
4.6 came with some new things in bone system so maybe this could be combined with nodes , code , and some settings