Solved Player camera control algorithm?

Discussion in 'Plugin Development' started by EgyptianKing, Oct 18, 2014.

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

    EgyptianKing

    Hey I want to make my players start out with a sort of tutorial which shows areas of the spawn by forcefully taking the player's camera and moving it around. I've seen this on one of those Runescape servers, so I know it's possible. Anyone got an algorithm or a method I could use?
     
  2. Offline

    mine-care

    i belive you cannot tahe players view and move it arround, you need to move the entire player. So as for the tutorial, i sugest you have a set of locations and then every XX seconds teleport player to one by one and showing them arround.
    If you insist you want the player body to stay in a location and his camera to move, you can use NMS to create a copy of the player in the location he requested for tutorial, and then take the actual player, set him invisible and do the things sugested above.
    Hope i helped.
     
    EgyptianKing likes this.
  3. Offline

    teej107

    EgyptianKing likes this.
  4. Offline

    EgyptianKing

  5. Offline

    mine-care

    =) anytime!
     
  6. Offline

    FerusGrim

    You can in fact, I'm sure, move the players camera. A player's Yaw and Pitch are stored values, which is why when you set a spawn or warp, the player will spawn looking in that direction or angle.

    All that you would need to do is modify the players yaw/pitch, without modifying the x, y, or z coordinates. Rather simple, actually. The trick would be finding the correct way in which to modify those variables for a smooth transition.
     
    EgyptianKing likes this.
  7. Offline

    EgyptianKing

    FerusGrim
    Thanks I'll try your method along with the other two's.
     
Thread Status:
Not open for further replies.

Share This Page