public void UpdatePosition(ulong time)
        {
            ulong count = 0;

            foreach (var node in m_SelectedNodes)
            {
                ulong currentTime = time + 1500 * count;
                count++;
                var currenmtMotion = m_Motion.GetCurrentMotion(currentTime);
                var currentPositon = currenmtMotion.GetCurrentPosition(currentTime);
                node.Position = VectorConversions.ToOgreVector(currentPositon);

                var rotation = new Primitives.Angle(currenmtMotion.GetVelocity(currentTime));
                rotation.ReduceAngle();

                Quaternion quat = new Quaternion(new Radian(rotation.Value), new Vector3(0, -1, 0));
                node.Orientation = quat;
            }
        }
示例#2
0
 private void MoveMarker(SetPathToTargetMessage message)
 {
     m_Marker.Position = VectorConversions.ToOgreVector(message.WorldPosition);
 }
示例#3
0
 private void MoveMarker(SelectObjectAtMessage message)
 {
     m_Marker.Position = VectorConversions.ToOgreVector(message.WorldPosition);
 }