Vivecraft / VivecraftMod

An experimental port of Vivecraft to Forge/Fabric
Other
162 stars 33 forks source link

Allow X Rotation to be Set by `/tp` (and API Call) #257

Open hammy275 opened 5 months ago

hammy275 commented 5 months ago

At the moment, one can't set the rotation of the player, as calls to the player's setter functions are effectively useless as the data it sets is overwritten by rotation values from the HMD.

In most cases, this makes sense to prevent disorienting the player. However, for something like /tp, a rotation value can be explicitly specified, which makes more sense to adjust the player for. Additionally, it would be useful to expose this function to mod devs (probably as part of or an extension to #255) , so mod devs that want to explicitly rotate a VR player can do so.

Note that none of these should allow affecting the y rotation, as then we could desync the player's vertical head rotation from where their head physically is vertically, which would be bad.