Move OmniLight

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By PtrMan

How to (procedurally) update the position of a OmniLight object?

I tried the following without any success (TestLight2 is a children of the Node to which this script is attached, tx and tz are valid float var’s)

get_node("./TestLight2").set_translation(Vector3(tx,0.8,tz))
get_node("./TestLight2").force_update_transform()
:bust_in_silhouette: Reply From: PtrMan

The light must not be a parent to work correctly

get_node("./../TestLight1").set_translation(Vector3(tx,0.8,tz))

force_update_transform() is not necessary