Пример #1
0
    /// <summary> Update the UI for rotation </summary>
    public void UpdateRotationFields()
    {
        Vector3 rotation = Arrows.Engine2UI(EditorGeneral.current_movable.Rotation);

        xrot.value = rotation.x / 360 + .5f;
        yrot.value = rotation.y / 360 + .5f;
        zrot.value = rotation.z / 360 + .5f;
    }
Пример #2
0
    /// <summary> Update the UI for the position </summary>
    public void UpdatePositionFileds()
    {
        if (EditorGeneral.current_movable == null)
        {
            return;
        }
        Vector3 position = Arrows.Engine2UI(EditorGeneral.current_movable.Position);

        xpos.text = position.x.ToString();
        ypos.text = position.y.ToString();
        zpos.text = position.z.ToString();
    }
Пример #3
0
    /// <summary> Update the UI for the rotation and the angular rotation </summary>
    public void UpdateVelocities()
    {
        Vector3 velocity = Arrows.Engine2UI(EditorGeneral.current_movable.Velocity);

        vel_x.text = velocity.x.ToString();
        vel_y.text = velocity.y.ToString();
        vel_z.text = velocity.z.ToString();

        Vector3 angular = Arrows.Engine2UI(EditorGeneral.current_movable.AngularVelocity);

        ang_x.text = angular.x.ToString();
        ang_y.text = angular.y.ToString();
        ang_z.text = angular.z.ToString();
    }