Advertisement
Guest User

Untitled

a guest
Dec 3rd, 2022
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
GDScript 0.31 KB | Source Code | 0 0
  1. extends KinematicBody2D
  2.  
  3. # Linear velocity.
  4. var linear_velocity : Vector2 = Vector2.ZERO
  5.  
  6. # Ready.
  7. func _ready():
  8.     pass
  9.    
  10. # Physics process.
  11. func _physics_process(delta):
  12.     move_and_slide(linear_velocity)
  13.    
  14. # Set the linear velocity.
  15. func set_linear_velocity(velocity):
  16.     linear_velocity = velocity
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement