Reflecting vectors

Discussion in 'Plugin Development' started by MattTheBeast, Jan 1, 2018.

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

    MattTheBeast

    Hi, I'm currently trying to figure out how to reflect a vector.

    What I mean: Basically lets say I have a direction a player is looking at, if hes looking at a block I whant a direction from that block with the reflected angles.
     
  2. Offline

    Zombie_Striker

    @MattTheBeast
    A reflection of a vector is a vector that has the XYZ Inverted. Multiplying the vector by -1 should give you a vector pointed in the opposite direction.
     
  3. Offline

    MattTheBeast

    @Zombie_Striker Thanks, Iv always whanted to know how to do that, I suck with vectors lmao
     
  4. Offline

    MattTheBeast

    @Zombie_Striker

    One more question, how would I get a perpendicular vector?
     
  5. Offline

    Zombie_Striker

    @MattTheBeast
    Set the X equal to the Z, and the Z equal to the X.
     
  6. Offline

    MattTheBeast


    thanks
     
Thread Status:
Not open for further replies.

Share This Page