Created a basic start to a virtual mouse
This commit is contained in:
13
Assets/components/VirtualMouse.gd
Normal file
13
Assets/components/VirtualMouse.gd
Normal file
@ -0,0 +1,13 @@
|
||||
extends RigidBody2D
|
||||
|
||||
@export_range(0,50,.1) var Cursor_Speed:float = 1
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
var movement = Input.get_vector("move_left","move_right","move_forward", "move_back")
|
||||
move_and_collide(movement * Cursor_Speed)
|
||||
Reference in New Issue
Block a user