Forum Discussion

developer.madeforme's avatar
developer.madeforme
Honored Guest
15 days ago
Solved

Resetting the rotation of a OneGrapRotationTransformer

In case someone is struggling to reset the rotation of a Transform which is controlled by a OneGrabRotationTransformer, the only way I've found to achieve that is what's done in this post: Reset a "One grab rotate transformer" | Meta Community Forums - 1269247. TLDR; Create your own OneGrabRotateTransformer, and implement the login in it's EndTransform-method, where you'll be able to fully reset the internal state of the transformer.

public void EndTransform()
{
var targetTransform = _grabbable.Transform;
targetTransform.localEulerAngles = Vector3.zero;
_relativeAngle = 0.0f;
_constrainedRelativeAngle = 0.0f;
}

I'm hoping this gets support in the SDK...

  • Thanks for your post here! I went ahead and moved the post you mentioned out of the archive and into this forum so people can find it more easily. I double-checked and your link above still directs to the correct post, so no need to update it. If there are any other solutions or posts you found useful, please feel free to let me know and I'll be happy to move them over.

    As to your point about having this supported natively in our Interaction SDK, this is the exact type of feedback that our product team is looking for in the Feedback Center. If you'd like, you can post this to the voting board over there and link to your feedback in this post so other people who come across this issue can vote for it! 

1 Reply

  • h.taylor's avatar
    h.taylor
    Community Manager

    Thanks for your post here! I went ahead and moved the post you mentioned out of the archive and into this forum so people can find it more easily. I double-checked and your link above still directs to the correct post, so no need to update it. If there are any other solutions or posts you found useful, please feel free to let me know and I'll be happy to move them over.

    As to your point about having this supported natively in our Interaction SDK, this is the exact type of feedback that our product team is looking for in the Feedback Center. If you'd like, you can post this to the voting board over there and link to your feedback in this post so other people who come across this issue can vote for it! 

→ Find helpful resources to begin your development journey in Getting Started

→ Get the latest information about HorizonOS development in News & Announcements.

→ Access Start program mentor videos and share knowledge, tutorials, and videos in Community Resources.

→ Get support or provide help in Questions & Discussions.

→ Show off your work in What I’m Building to get feedback and find playtesters.

→ Looking for documentation?  Developer Docs

→ Looking for account support?  Support Center

→ Looking for the previous forum?  Forum Archive

→ Looking to join the Start program? Apply here.

 

Recent Discussions