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.

Components of an 3d object are rotating while TapToPlace

Hey guys,

i am using the TapToPlace from HTK 5.4 and as soon as i tap, the component rotates one time.
The result is that i cant gaze to its box collider and cant place that tapped component anymore. I didnt change any settings, what could be the problem????

Thank you for your attention.

Answers

  • What other components are on the object?

    What do you mean it rotates one time? ex: It turns 90 degrees on the x axis...

    Taqtile

  • @mark_grossnickle,

    the object is a milling machine. When i tap the object or any other component of it e.g. the doors turn 90 degrees on the x axis immediately after the tap action.
    What is the problem???? I didnt get it and dont know why it turns.
    Do you have an idea. Also when i tap the whole machine it turns 90 degrees on the x axis.

  • The only time the object is rotated is in the update tick before you place. It grabs the camera's rotation and makes the object match that.

    So my guess is that either your camera is changing when you hit tap. Do you have any code that is moving the camera?

    Or there is another behavior that if changing the rotation. Are there any other behaviors on the object? Perhaps try removing all other behaviors besides the tap to place to see if that fixes the issue.

    Taqtile

  • @mark_grossnickle,
    i noticed that the 3d model is turned 90 degrees on the x axis as soon as the object is in the scene. So when i put the 3d model into the scene, in the inspector panel in the transform section the object is rotated -90 degrees on the x axis. This is curious because i didnt set or change anything, i just placed the 3d model into the scene and when i taptoplace to 3d model in turns always. The other point is that if i would change the rotation and set it to 0 degrees on the x axis, the main camera doesnt show me the front view of the 3d model. So its kinda confusing. I do have only the taptoplace script on that model and i really dont know how to fix the issue.

  • I'm not sure I quite follow but if you need it to be 90 degrees off you could make a parent object and place this object as a child.

    Set your child object to be -90 degress on the x or whatever you need to make it face the camera.

    Put the tap to place on the parent object and have its rotation be 0,0,0.

    Taqtile

  • Hi @mark_grossnickle,

    all right i am gonna check it out thank you very much

  • You should make sure the 3d object are rotated correctly when you are exporting it from the 3d tool it was created in. (If you have Control over it) I had probs With a mesh when using the Billboard script and ended up adjusting in Blender to maintain the cleanest unity solution

  • @mark_grossnickle Thank you that solved the problem

Sign In or Register to comment.