简体   繁体   English

如何在Vuforia Image Target中的3D模型中移动?

[英]How to move around a 3D model in Vuforia Image Target?

I have been developing AR Apps using Unity 3D and Vuforia SDK. 我一直在使用Unity 3D和Vuforia SDK开发AR Apps。 In our applications, the 3d models are being placed in a position in ImageTarget and the models are doing the animations in the same position only! 在我们的应用程序中,将3d模型放置在ImageTarget中的某个位置,并且这些模型仅在同一位置进行动画! How to make 3D models to move around the image target? 如何使3D模型在图像目标周围移动? (ie,) Movement should be independent instead of being attached to a position! (即)动作应该独立,而不是附属于某个位置!

You have to implement the translation of your object. 您必须实现对象的翻译。 It's independant from the animation. 它独立于动画。 You could do something like this to your gameobject : 您可以对您的游戏对象执行以下操作:

public float speed;

void Update () {
    this.transform.Translate(speed, 0, 0);
}

But it would simply make a translation of your gameobject once per frame on the x axis. 但这只会使您的游戏对象在x轴上每帧平移一次。 If you would like to make it move like it is a player character, you should look at this tutorial . 如果您想让它像玩家角色一样移动,您应该看一下本教程 If you are having problems while testing your movement, it's possible that would have to change Vuforia's camera settings. 如果您在测试运动时遇到问题,则可能必须更改Vuforia的相机设置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM