a few changes on teleport lookat

This commit is contained in:
UbitUmarov
2021-09-15 23:01:01 +01:00
parent a3ab4db5fc
commit 55fb69f8e0
3 changed files with 24 additions and 4 deletions

View File

@@ -407,6 +407,21 @@ namespace OpenSim.Framework
public Dictionary<string, UUID> MovementAnimationOverRides = new Dictionary<string, UUID>();
public void SetLookAt(Vector3 value)
{
if (value == Vector3.Zero)
{
AtAxis = Vector3.UnitX;
LeftAxis = Vector3.UnitY;
AtAxis = Vector3.UnitZ;
return;
}
AtAxis = new Vector3(value.X, value.Y, 0);
AtAxis.Normalize();
LeftAxis = new Vector3(-AtAxis.Y, AtAxis.X, 0);
UpAxis = Vector3.UnitZ;
}
public virtual OSDMap Pack(EntityTransferContext ctx)
{
// m_log.InfoFormat("[CHILDAGENTDATAUPDATE] Pack data");