How to properly set a node3d origin

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By treppenwitz
var new_player = player_scene.instance()
new_player.global_transform.origin = $ReleasePosition.global_transform.origin

I try to instanciate a new node at some point3d position.
However, even if my print seems good the new node doesn’t appear at the desired position.
What am I doing wrong?

(Sorry for my English which is not my native language)

Check your player scene, make sure its visual nodes aren’t offset from the root.
If not, then the problem is outside your code sample.
It might also depend on what type your player node is, or maybe something else is changing its position (other scripts? Animation? Rigidbody?).

Zylann | 2020-11-12 16:55

Thanks Zylannn
My player is a kinematicBody, I apply gravity and use move_and_slide_with_snap()
Still stuck tho, here is my project’s github and branch:

treppenwitz | 2020-11-13 07:48