Top Down Movement in Godot in LESS THAN 3 MINUTES!

preview_player
Показать описание
---
---

Please Like and Subscribe, if you don't, thanks for a view at least!
Рекомендации по теме
Комментарии
Автор

thank you! I initially rolled my eyes at the joke at the beginning, but this tutorial actually really helped. All the other tutorials dragged on about nothing and lasted like 15+ minutes and often didn't even explain the code I was writing, but this actually did what it said it was gonna do quickly and efficiently. subbed and liked :)

cupofdirtfordinner
Автор

You have made my life times easier.
Rather than explaining what movement is and "hi guys, -name- here!" you immediatley get to the point.
Thank you!

skvader
Автор

You don't understand how much this video has helped me, this was so easy to understand and VERY well made :D It would be so great if you made more tutorials like this!

fablivion
Автор

wow this tutorial is so well made! i wonder who edited this masterpiece

jdKrazy
Автор

but the Sprite is moving according global_world axis not mouse look axis😢

Cr-kzmp
Автор

Hi, "kinematic"body doesn't appear on my godot :/

majinvegeta
Автор

This page has the updated script. GD4 made it very simple to do:

extends CharacterBody2D

@export var speed = 400

func get_input():
var input_direction = Input.get_vector("left", "right", "up", "down")
velocity = input_direction * speed

func _physics_process(delta):
get_input()
move_and_slide()

bigrigbutters
Автор

I have a question: when I put in your code it says Error at (22, 5): Function move_and_slide() not found in base self. Can someone please help me?

Albert-I
Автор

Just do this:
var axisx = -

Then same for axisy but use up - down instead of right - left, then it should say -1 for down and left and 1 for right and up and 0 for no movement using less if statements makes the game run faster, work smart not hard

yoru_.
Автор

easy decision to sub that was so helpful thanks so much

finnstonchurchill
Автор

(FIXED: I needed to change it from key_just_pressed, i was using auto fill and didnt catch that) im confused, i wrote the code right but im only moving a little bit each time i press left, right, up, or down. i dont know if this is because i didnt use wasd controls

cuminthesink
Автор

I have my favorite cheese burger, but I now move diagonally faster than I move in a single direction. how do I fix this?

bitlinkgame
Автор

I need help it comes up with an error :if
velocity.y += speed
if
velocity.y -= speed
if
velocity.x -= speed
if
velocity.x += speed
velocity.x += speed

move_and_slide(velocity)

YKWinterWolf
Автор

For me I get the error message "Identifier velocity not declared in the current scope" anyone have an idea of what I need to do?

SprBailey
Автор

can someone help me it is giving me an error saying the method "move_and_slide"isnt declared in the current class

gametube
Автор

Thanks! But what if I want my character to face the direction I m moving in and not the mouse pointer?

Ukysseus
Автор

man, u haven't made a vid edited this good since the gartic phone vid

ortanicallity
Автор

why wont the "move_and_slide(velocity)" script wont work?
heres my code (i had to change the velocity name because godot got angry at me)
extends CharacterBody2D

var speed = 200
var velocitty = Vector2()

func _physics_process(delta):
velocitty = Vector2()

if
velocitty.y += speed
if
velocitty.y -= speed
if
velocitty.x -= speed
if
velocitty.x += speed

move_and_slide(velocitty)

badmusicproducer_offical
Автор

I get the error "move_and_slide" isnt declared in the current class

Shadowthevampire
Автор

Is there a way to make the player not slide around after having stopped pressing w, s, a or d?

sauser