From 396ab1424ccefda82ff59e6ea7fc8b4fb698385b Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 25 Aug 2017 23:44:59 +0100 Subject: in some cases ll TPVs can only see avatar rotations around Z or camera misbehaves --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 6dd3885..c44c741 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -5589,6 +5589,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP velocity = presence.Velocity; acceleration = Vector3.Zero; rotation = presence.Rotation; + // tpvs can only see rotations around Z in some cases + if(!presence.Flying && !presence.IsSatOnObject) + { + rotation.X = 0f; + rotation.Y = 0f; + rotation.Normalize(); + } angularVelocity = presence.AngularVelocity; // m_log.DebugFormat( @@ -5718,6 +5725,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP Vector3 velocity = new Vector3(0, 0, 0); Vector3 acceleration = new Vector3(0, 0, 0); + // tpvs can only see rotations around Z in some cases + if(!data.Flying && !data.IsSatOnObject) + { + rotation.X = 0f; + rotation.Y = 0f; + } rotation.Normalize(); data.CollisionPlane.ToBytes(objectData, 0); -- cgit v1.1