Hi,

After seeing an example of a vehicle in Unity using a sphere to control it, I wanted to make something similar in godot. https://twitter.com/KenneyNL/status/1107783904784715788

What I basically have is a RigidBody with a sphere collision shape that controls the forward/backward momentum and a sprite inside the sphere that dictates the direction everything is supposed to be heading torwards to.

It's hard to explain, but the problem is that when I stop turning, the ball goes diagonally instead of straight forward, depending of the orientation.

Here's the code for my RigidBody

``````extends RigidBody

var movement = Vector3.ZERO
var velocity = Vector3.ZERO
var speed = 15

func _integrate_forces(state):
#collision_layer = 1
# Reset movement
movement = Vector3.ZERO
# Get sprite's vector
sprite = get_node("../sprite")
velocity =  sprite.transform.basis.z

# Inputs
if Input.is_action_pressed("up"):
movement.z -= 1
movement.x -= 1
if Input.is_action_pressed("down"):
movement.z += 1
movement.x += 1
if Input.is_key_pressed(KEY_SPACE):
collision_layer = 0

# Apply force
add_force(Vector3(movement * velocity).normalized() * speed, Vector3.ZERO)
``````

Here's the code for the Sprite:

``````extends Sprite3D

onready var StartOffset = self.transform.origin - TargetNode.transform.origin

func _process(delta):
self.transform.origin = TargetNode.transform.origin + StartOffset
# Rotate left or right
if Input.is_action_pressed("left"):
if Input.is_action_pressed("right"):