So here is what I’m trying to do, and I never took physics so I’m starting to get lost with it.
I’m using ent:SetLocalVelocity() to launch the player from one point to another point higher up.
To figure out the velocity that is needed I asked a teacher of mine that teaches physics and he gave me this equation:
V[SUB]1[/SUB] is the velocity that I’m solving for.
h is how high the end point is compared to the start point.
x is how far away the end point is from the start point.
θ is the angle that the player is launched.
g is gravity but I’m not sure what it is for Garry’s Mod. (helpful link?)
Here is a diagram of the situation:
I have an entity that you place in a map and set the angle and the end point before you compile the map.
In game the entity’s position, the end position and the angle with be put in the formula.
I need help getting this formula into my code properly and figuring out how to calculate g for the formula.
Just noticed the Photoshop tag :downs: