local _Target = vci.assets.GetSubItem("Target") function update() -- Get the axis input. local axis = vci.me.GetAxisInput() -- Input log if axis.x ~= 0 then print(" X : "..tostring(axis.x)) end if axis.y ~= 0 then print(" Y : "..tostring(axis.y)) end if axis.z ~= 0 then print(" Z : "..tostring(axis.z)) end -- Move the Target local pos = 0.01 * axis + _Target.GetLocalPosition() _Target.SetLocalPosition(pos) -- Get input if vci.me.GetButtonInput(1) then print(" Button1 pushed") -- Process rotation local rot = _Target.GetLocalRotation() rot = rot * Quaternion.AngleAxis(-30, Vector3.forward) _Target.SetLocalRotation(rot) end -- Get input if vci.me.GetButtonInput(2) then print(" Button2 pushed") -- Process rotation local rot = _Target.GetLocalRotation() rot = rot * Quaternion.AngleAxis(30, Vector3.forward) _Target.SetLocalRotation(rot) end -- Get input if vci.me.GetButtonInput(3) then print(" Button3 pushed") -- Process scale local scale = _Target.GetLocalScale() if scale.x < 0.2 then return end scale = scale + Vector3.__new(-0.1, -0.1, -0.1) _Target.SetLocalScale(scale) end -- Get input if vci.me.GetButtonInput(4) then print(" Button4 pushed") -- Process scale local scale = _Target.GetLocalScale() scale = scale + Vector3.__new(0.2, 0.2, 0.2) _Target.SetLocalScale(scale) end end