0 votes

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);
getparent().addchild(ball)

Then in physicsprocess 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

in Engine by (12 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.