I’m getting into Nvidia Omniverse with Isaac Sim, and I tried to get the mouse location in world coordinates, but I can’t find any code that helps me. Can someone give me some guidance?
That is because the mouse is never IN world coordinates. The mouse interacts with a 2D screen which attaches to the manipulator gizmo of an object in 3D world space through an UI overlay. But it is the object that is in world space coordinates. Not the mouse. The mouse is just a tool for you, the user to interact with the objects.
What are you trying to do? You are better off getting the coordinates of the object that the mouse is manipulating at the time.
I want to spawn an object on the mouse position when click. In other programs like Unity or Unreal I make a raycast to get the position of the mouse in world coordinates, but here in didn’t find anything to do this.
Yes makes sense. A raycast will convert the 2D relative screen position, to an assume 3D world space coordinate.
Let me see if I can get someone to help here
I have a follow up here. If you check out this GitHub page, it offers various code samples, including using the mouse location to run a script
GitHub - NVIDIA-Omniverse/kit-extension-sample-ui-scene: Sample Repository to create Kit Extension using the ui.scene API
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.