Is there a Look At command?

Hi there,

i’d like to rotate any given object (e.g. a simple cube) towards another object in world space. Instead of hard coding the calculation of the rotation angle inside a extension it would be helpful if there was a ‘look at’ command, so the object just rotates automatically.

Is a kind of ‘look at’ command a thing in omniverse?

Thanks in Advance!

Hi @Jens_G94. We have a few nodes to do this:


This is a really good option if you want to maintain the look_at in real-time as the prims move around.

I don’t see a command, but it’s totally possible and you could implement a new Kit Command if you wanted to. Does that help or was it more of a feature request?

Thank you so much! The possibility of maintaining the look towards a target is exactly what i need.

I did not find any ressource on how to add a node to an object by code, yet. In this specific use case - how do i add the “make prim look at target” node and define whats the target the object should be looking at?

Edit:
Is it possible to add some kind of delay to the rotating object, so it doesn’t follow the target in real-time?
A thinkable use case for this behaviour could be, to test different latencys which happen in real life, due to limitations of electronic curcuits (which are the source of the rotation) and the physical object itself.

Thanks in Advance!

Hi. Please refer to our OmniGraph scripting docs if you’re interested in creating nodes programmatically: omni.graph: OmniGraph Python Scripting — kit-sdk 103.1 documentation

We have an “Interpolate To” node and “Easing Function” node to do what you described. Here’s a video showing Easing: Action Graph and USD Curves Extension Overview in Omniverse Create - YouTube

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.