I hate github desktop oh my god just let me create a new branch i gave up on creating a new branch It wont let me move to a new branch cause it thinks there are conflicts. what the fuck is the point of that It may say that there are conflicting files. push them through anyways, git is tweaking. I tested it myself, and the last commit to main was also from me so there's nothing to be conflicting with
24 lines
557 B
GDScript
24 lines
557 B
GDScript
extends CharacterBody2D
|
|
|
|
|
|
const SPEED = 300.0
|
|
|
|
|
|
func _process(_delta: float) -> void:
|
|
|
|
var dirX := Input.get_axis("move_left", "move_right")
|
|
var dirY := Input.get_axis("move_up", "move_down")
|
|
|
|
var dir := Vector2(dirX, dirY)
|
|
dir = dir.normalized() * SPEED
|
|
|
|
velocity.x = dir.x
|
|
velocity.y = dir.y
|
|
|
|
move_and_slide()
|
|
|
|
# look_at(get_global_mouse_position()) # uncompensated mouse control
|
|
|
|
var angle_to_mouse = get_angle_to(get_global_mouse_position())
|
|
rotation += angle_to_mouse# + deg_to_rad(90) #+90 to makes top of image face mouse, not side
|