0

I'm building an Augmented Reality app with Unity and ARToolkit for Android. I have multiple GameObjects on screen that are children of my marker. Works well. I then created a very simple script to move one of the objects and I attached the script to the game object. It looks like:

void Update()
{
    Vector3 currentPos = transform.position;
    transform.position = new Vector3(currentPos.x + (.01f * xDirection * xSpeed), currentPos.y + (.01f * yDirection * ySpeed), currentPos.z);
}

The rest of the script does nothing other than alter the value of the direction and speed variables. It works and goes in the directions that I expect, however the object shrinks in size visually. Possible it's just lower on the z axis so it appears smaller, or possible scaling is getting affected. I think it may be related to the movement of the phone up and down while looking at the marker.

I suppose I have to move GameObjects in a different manner than normal when using ARToolkit. What's the proper way?

Thanks

1 Answer 1

0

I've no connection with ARToolkit by try checking out their Coordinate System

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.