void HandleOrientationUpdate() { byte id = reader.ReadUInt8(); float rotY = (float)Utils.PackedToDegrees(reader.ReadUInt8()); float headX = (float)Utils.PackedToDegrees(reader.ReadUInt8()); LocationUpdate update = LocationUpdate.MakeOri(rotY, headX); net.UpdateLocation(id, update, true); }
internal void HandleOrientationUpdate() { byte id = reader.ReadUInt8(); float yaw = (float)Utils.PackedToDegrees(reader.ReadUInt8()); float pitch = (float)Utils.PackedToDegrees(reader.ReadUInt8()); LocationUpdate update = LocationUpdate.MakeOri(yaw, pitch); UpdateLocation(id, update, true); }
protected void MoveInDirection(Entity source, Vector3 dir) { double rotYRadians, headXRadians; Utils.GetHeading(dir, out rotYRadians, out headXRadians); float rotY = (float)(rotYRadians * Utils.Rad2Deg); float headX = (float)(headXRadians * Utils.Rad2Deg); LocationUpdate update = LocationUpdate.MakeOri(rotY, headX); source.SetLocation(update, false); MoveVelocity = dir * 0.9f; }