Nothing happens when I play scene

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By bfish

I have a simple scene where I am trying to move a KinematicBody, but nothing happens when I play the scene. When I check the console, the position is updating but nothing is moving in the scene. There is a camera, and the KinematicBody has a Mesh and CollisionShape attached along with the following script.

extends KinematicBody

func _init():

func _physics_process(_delta):
	var velocity = move_and_slide(Vector3.LEFT * 10, Vector3.UP)

How do you know it’s not moving? Are there any background objects to use for reference?

exuin | 2023-02-25 08:50

What is the value of velocity?

SteveSmith | 2023-02-25 11:39

Like @exuin mentioned, if your camera is moving along wit the other objects in your scene, you won’t actually see any visual motion unless there are other objects in the scene that are not moving (for visual reference).

jgodfrey | 2023-02-25 15:05

I have a floor and the camera is unattached, they all sit at the origin. Here’s how my scene is set up, I’m probably doing something wrong.

enter image description here

bfish | 2023-02-25 20:24

:bust_in_silhouette: Reply From: Jayden13O

Have you tried having var velocity outside of the _physics_process? Maybe that works.