Getting the player's position next tick (Vector math help)

Discussion in 'Plugin Development' started by Gristly, Mar 6, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    Gristly

    So I've been working on a plugin, and basically what I want to implement is recoil for guns. I want to do this by changing the player camera's pitch. From what I've found, the only safe way to do this is with teleporting. Now, what I'm wondering is instead of teleporting the player to their current position with a new pitch, is there a way of teleporting them to their position next tick or something near that. So, my question is this: Using the player's position vector and velocity vector, how do I get the player's next position? Is it as simple as adding them together? What math exactly does this entail?

    Thanks!
     
  2. Offline

    nuno1212sss

    @Gristly Get the players location, get the players velocity.
    Add velocity to location. Teleport to location. Done.
     
Thread Status:
Not open for further replies.

Share This Page