how do i detect velocity for an fps game

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

how do i detect when velocity is a ceirtain value in gdscript for an fps game

:bust_in_silhouette: Reply From: zhyrin

Velocity of what?
Your character?
It’s most likely implemented as a CharacterBody3D, which has a velocity member (Vector3).
You can get the length with Vector3.length(), if it’s zero, your character is stopped.

With all due respect, your questions make you look like you have no idea how to approach your issues (which is fine), and you would rather someone else write your code (which is not fine).
For your own benefit, I would highly recommend you seek out educational content about godot and programming before asking questions related to your project because “you are stuck”.
Read the manual, search for tutorials. If you search for 3D character animation in godot on youtube, 98% of videos will have you work with character velocity some way or another.

im not really asking for code, i just want someone to help me understand how i can write it myself atleast to some extent and cant find that much/ dont know what to searchon youtube and google, but thanks

yoshman | 2023-03-12 15:03