Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | wbulot |
Hi guys,
I’m new to godot and I’m testing the engine with a lot of test scenes to understand how the physics engine works.
So let’s imagine a simple situation where I create a rigidBody at a specific position.
I have this code :
var ball = preload(“res://Others/ball.tscn”).instance();
ball.transform.origin = Vector3(5,5,5);
get_parent().add_child(ball)
Then in _physics_process I monitor the position of my ball with :
print(ball.get_transform().origin)
And here is the result :
(5, 5, 5)
(0, 0, 0)
(5, 5, 5)
(5, 4.997278, 5)
(5, 4.991833, 5)
etc …
The ball is created at the right position, then return to origin before to be at the right position again and then physics start.
This is a very weird behavior and in my specific case it causes problem because I need to monitor the position on this ball and do action according to. I can ofc do a workaround to avoid tracking it when pos is at 0,0,0, but is all this normal ?
Thank you