Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | elmo |
I have create a very simple scene with just a RigidBody in it.
My whole code is below:
extends RigidBody
func _ready():
self.apply_central_impulse(Vector3(1, 0, 0))
self.gravity_scale = 0
self.linear_damp = 0
self.friction = 0
func _integrate_forces(state):
print("v", self.linear_velocity)
The only thing that happens is a single force impulse at the beginning.
What I expected to happen then was that (in absence of gravity, dampening, and friction) it will maintain constant speed (as no other forces act on it).
However what I am observing is linear_velocity continuously becoming smaller.
I.e. output is:
--- Debugging process started ---
Godot Engine v3.4.4.stable.official.419e713a2 - https://godotengine.org
OpenGL ES 3.0 Renderer: NVIDIA GeForce RTX 2070 SUPER/PCIe/SSE2
OpenGL ES Batching: ON
v(1, 0, 0)
v(0.998333, 0, 0)
v(0.996669, 0, 0)
v(0.995008, 0, 0)
v(0.99335, 0, 0)
v(0.991694, 0, 0)
v(0.990042, 0, 0)
v(0.988392, 0, 0)
v(0.986744, 0, 0)
v(0.9851, 0, 0)
What is causing my RigidBody to slow down?