Topic locked

prevent to move 3d object on certain direction

April 9, 2014 - 5:10am #1

hello,,, i have used and try to modify this code > https://developer.vuforia.com/resources/dev-guide/unity-drag-ar-object-screen-your-finger

and it's successfully move cube object. but i have some case that sometimes my object cannot be moved on y axis(upward and downward) or z axis(backward and forward).

i try to make y axis to be zero but it's not working... i just can move my object to right and left,,, but not to backward and forward.

then i've tried to add rigidbody and checked y axis on Freeze Position but i still can move my object upward and downward

 

thanks for your help

prevent to move 3d object on certain direction

April 9, 2014 - 5:17am #2

The article you mention (https://developer.vuforia.com/resources/dev-guide/unity-drag-ar-object-screen-your-finger), simply shows an example of how you can move an object which is child of a Target in a plane parallel to the screen.

If you want to achieve different type of motion, you can do this by adjusting the code in that tutorial to achieve the desired translations; however this is just about Unity programming, so probably not in the scope of this Vuforia forum.

You can search for information about how to handle transformations in Unity in the Unity 3D website:

https://unity3d.com/

 

Topic locked