I want to rotate prim locally and globally as well. There should not be any parent to prim.
So, I want to know the API methods (python) that can be used to rotate a prim locally and globally. for ex. like in Unity we have transform.localRotation and transform.rotation, do we have same kinds of APIs in Omniverse ?
This will launch the Commands window. Select your prop and rotate it, and the python that is executed under the hood will show in the commands window.
Here is an example of rotating a camera, you can replace /World/Camera with the path to your prim.
value=Gf.Vec3f(newRotationX, rotationY, rotationZ),
prev=Gf.Vec3f(rotationX, rotationY, rotationZ))
Here is my full button click where I get the rotation of a camera and move it based upon a slider value (@maticodes helped with this and he wrote the camera moving forward math because I would have never figured it out).
Video coming soon, but to use it set the timeline to the frame you desire, move your camera to where you want, then click the Set Keys button. This sets all 6 keys for translate x,y,z and rotation x,y,z.
I have already found this pretty useful for making. fly throughs and other camera movements.