• Type: New Feature
    • Resolution: Fixed
    • Priority: Minor
    • None
    • Affects Version/s: None
    • None

      It's verry bad and buggy if you want to set the camera/view for a player. This API will set the camera/view for a player.
      It would be very nice if you develop this API.

          [SPIGOT-436] Camera/Spectate API

          Joel Paulien added a comment -

          Perfect, only you only made it possible to set a target, not get the target back from Player, which can help a lot in plugins. Could this be done?

          Joel Paulien added a comment - Perfect, only you only made it possible to set a target, not get the target back from Player, which can help a lot in plugins. Could this be done?

          Jörn D. added a comment - - edited

          It would be even nice if you can't open the spectator menu. Because if you use the api in minigames the user should 'stay' in the person and shouldn't teleport away with the spectator menu.

          Jörn D. added a comment - - edited It would be even nice if you can't open the spectator menu. Because if you use the api in minigames the user should 'stay' in the person and shouldn't teleport away with the spectator menu.

          md_5 added a comment -

          Pull request opened.

          md_5 added a comment - Pull request opened.

          Jörn D. added a comment -

          I don't use the packet, I use the method attack(Entity e) in the EntityPlayer.class.

          Jörn D. added a comment - I don't use the packet, I use the method attack(Entity e) in the EntityPlayer.class.

          MCShamrock added a comment - - edited

          @Jörn D. So the problem is that in GameMode.SPECTATOR when spectating an entity that moves away, the camera perspective doesn't move along? Did I get this right? If yes, for which camera perspectives is the bug? What happens when you set the packet and how do you send it? The camera packet is to tell the client to move the camera to the eyes of a given entity. Not to toggle first/third person.

          MCShamrock added a comment - - edited @Jörn D. So the problem is that in GameMode.SPECTATOR when spectating an entity that moves away, the camera perspective doesn't move along? Did I get this right? If yes, for which camera perspectives is the bug? What happens when you set the packet and how do you send it? The camera packet is to tell the client to move the camera to the eyes of a given entity. Not to toggle first/third person.

          Jörn D. added a comment -

          In general yes, but when you interact with an entity in Gamemode 3 you can spectate him.

          Jörn D. added a comment - In general yes, but when you interact with an entity in Gamemode 3 you can spectate him.

          Zeryther added a comment -

          I don't understand.. do you mean:

          p.setGameMode(GameMode.SPECTATOR);

          ?

          Zeryther added a comment - I don't understand.. do you mean: p.setGameMode(GameMode.SPECTATOR); ?

          Jörn D. added a comment -

          If the player you're spectating moves some chunks away (from the location you started to spectate -> view distance) you stop spectating and start to jerk.

          Jörn D. added a comment - If the player you're spectating moves some chunks away (from the location you started to spectate -> view distance) you stop spectating and start to jerk.

          MCShamrock added a comment -

          How exactly does it bug? I guess if this packet is the only option how to do it and sending it directly via NMS is buggy, no server software can fix that since the packet is the only possibility.

          MCShamrock added a comment - How exactly does it bug? I guess if this packet is the only option how to do it and sending it directly via NMS is buggy, no server software can fix that since the packet is the only possibility.

          Jörn D. added a comment -

          I want to set the first/third person. It's possible with this packet: http://wiki.vg/Protocol#Camera, but it's very buggy

          Jörn D. added a comment - I want to set the first/third person. It's possible with this packet: http://wiki.vg/Protocol#Camera , but it's very buggy

            Assignee:
            md_5
            Reporter:
            Jörn D.
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: