Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.

How to make a hologram move towards camera?

Hi!
I have just started looking into hololens development, and would appreciate some input on the following; Using the astronaut in the Holograms 210 tutorial, how can I make the astronaut move/drift towards the camera? Im thinking by either a voice command or a gesture. Its just the moving part I am currently unsure of.

Kind regards,
Morten

Answers

  • Hey, @drainMorten

    Generally speaking, to move object C from object A to object B you have to interpolate object C's position between object A's position and object B's position over time. Something like this:

    // Inside object C's Update function
    objectC.transform.position = Vector3.Lerp(objectA.transform.position, objectB.transform.position, Time.deltaTime * objectCSpeedMultiplier);
    

    Hope this helps.

    Building the future of holographic navigation. We're hiring.

Sign In or Register to comment.