I'm making a mod for a game, and I want to make the character move faster, and jump higher. (Not at the same time, basically looking to make a super speed mod + super jump mod.)
I have access to the players position(Vector3), heading(in degrees), the players movement velocity in Vector3, and the ability to apply "force" to any direction I want(Vector3) on the player object.
So, these should be all I need, but, I can't figure the math out.
I figure for super speed, I could create an imaginary point in vector space along the players heading, and move the player towards the point, and have the point recalculate every frame, so the player never reaches it.
Then I can do something like this.
Player.Character.Velocity = Vector3.Normalize(ImaginaryPoint.Position - Player.Character.Position) * 5.0F
But, I can't figure out how to create my imaginary point. (I suppose one could use the heading to directly calculate\influence velocity as well.. But, I have no clue which formula I'm after.)
Jumping, is roughly the same thing, a slight boost for directional velocity + force applied to the Z axis should accomplish my goal.
At the moment, I have this primitive version of jumping implemented, it does indeed jump, but, it needs more directional velocity.
if (Game.isGameKeyPressed(GameKey.Jump))
{
Player.Character.ApplyForce(new Vector3(0, 0, 50), new Vector3(0, 0, 0));
}
So, can anyone help me out here?