How can I change the pivot of a GameObject

Viewed 156

I am currently working on a Project for the HoloLens2.
But currently I am stuck. I want to create a chest like Item, with a lid.

But currently I'm not able to rotate tge GameObject on the hinge with these components:
- Box Collider
- Manipulation Handler
- Near Interaction Grabbable

In the inspector i can Rotate the Object arount its pivot.

But i wasn't able to add the controlls with the HoloLens2 MRTK

1 Answers

The pivot is not a real thing that exists. The pivot is just the origin of the local coordinate system. Armed with this knowledge, there are two ways to move the pivot.

1) Move all the vertices (or the pivot) in your 3d modeling application.

2) parent your geometry to an empty game object, and use this new parent to rotate around.

Parent transform

Lid Transform

lid demo

Related