- Home /
Lean touch - Move object in X and Z axis
Hi guys,
I'm starting with Unity. I'm currently trying to modify the Lean touch 'SimpleMove' script in order to move my object only for X and Z axis, but at this stage nothing is working. I want to restrict the Y axis because moving here makes my model go out of scale. I would really appreciate some help from the experts. Cheers, P.
using UnityEngine;
using System.Collections;
// This script will move the GameObject based on finger gestures
public class SimpleMove : MonoBehaviour
{
protected virtual void LateUpdate()
{
// This will move the current transform based on a finger drag gesture
Lean.LeanTouch.MoveObject(transform, Lean.LeanTouch.DragDelta);
}
}
Comment