Created
December 18, 2021 21:05
-
-
Save workhorsy/087b0057b42a7f87d8de4983ce124ac3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Spatial moves without physics | |
| func _physics_process(delta : float) -> void: | |
| var speed := 1.0 | |
| var velocity := self.transform.basis.z * speed | |
| self.transform.origin += velocity * delta | |
| # KinematicBody moves with physics | |
| func _physics_process(delta : float) -> void: | |
| var speed := 1.0 | |
| var velocity := self.transform.basis.z * speed | |
| move_and_slide(velocity) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment