public bool SetBotRotation(UUID botID, Quaternion rotation, UUID attemptingUser) { if (GetBotWithPermission(botID, attemptingUser) == null) { return(false); } ScenePresence sp = m_scene.GetScenePresence(botID); if (sp == null) { return(false); } if (sp.PhysicsActor != null) { EntityBase.PositionInfo posInfo = sp.GetPosInfo(); posInfo.m_pos.Z += 0.001f; sp.SetAgentPositionInfo(null, false, posInfo.m_pos, posInfo.m_parent, Vector3.Zero, sp.Velocity); } sp.Rotation = rotation; sp.SendTerseUpdateToAllClients(); return(true); }