How to move & Zoom plane.SetMaterial Image?

puneetmahalipuneetmahali Member ✭✭
edited September 10 in UrhoSharp

After loading the Image from-
var plane = baseNode.CreateComponent();
plane.Model = CoreAssets.Models.Plane;

How can I move, Zoom In & Zoom Out the Image in a 2D view? Also, When I zoom In the image then it should be convert into 3D view like Google map.

Answers

  • TheRomanTheRoman Member
    edited September 13

    Hi, I`m not sure if I understood you right.

    Du you want to cast a 2D in a 3D when zoomed? I think there is no way.

    But weh you just want to change the angle of sight to your Plane. you culd do this in this way:

        protected override void Start()
        {
            Input.MultiGesture += HandleMultiTouchGesture;
        }
    
        private void HandleMultiTouchGesture(MultiGestureEventArgs args)
        {
    
                    if (args.NumFingers != 2) return;           
                    if (args.DDist > 0 & m_Camera.Fov > "someMinValue") m_Camera.Fov = m_Camera.Fov - 1;
                    if (args.DDist < 0 & m_Camera.Fov < "someMaxValue") m_Camera.Fov = m_Camera.Fov + 1;
    
                 ############## here you should change the angle lik this: #############
                    if (m_Camera.Fov <="someOtherValue") m_CameraNode.SetDirection(new Vector3(x1, y1, z1));
                    if (m_Camera.Fov >"someOtherValue") m_CameraNode.SetDirection(new Vector3(x2, y2, z2));
    
            ###########################################################
         }
    
Sign In or Register to comment.