Hi,
It may be because you are using set_translation instead of global_transform.
For example my codes use;
clone.global_transform = self.global_transform
But they are kinematic bodies, yours appear to be rigid bodies.
He docs say you can use set_global_transform (and other spatial methods) as long as they are only used when setting up a rigid body.
Hope this helps.
Thank you very much. It worked fine.
Do you normally use a rigidbody for bullets?
bgegg | 2019-08-24 07:13
Glad it’s working now and that I could help.
I have only used spatial nodes with meshes and areas to simulate where projectiles would be. I have looked into using rigid bodies a bit, as they could be useful for arrows that should arc once fired, rather than fly straight all the time.
But due to being busy (moving), I have not yet been able to fully test this idea.
For bullets, it depends on what effect you want to achieve, they normally move very fast, so a straight line can work better, and you won’tactually see them.
The godot docs cover an FPS tutorial ( FPS tutorial — Godot Engine (3.1) documentation in English ), which uses spatial bullets for the pistol and a raycast for the machine gun (higher rates of fire so you wouldn’t see the bullets), which I used as the basis for my arrows.