Create Your First Godot 4 Game
Lesson 9: Creating the player projectile
Video Notes
It’s time for the bad guys to meet a fiery end. We’re going to give our raptor an explosive fireball to shoot.
Corrections:
In Godot 4 Beta 16 or higher, the AnimatedSprite2D’s Playing checkbox has been removed from the Inspector. It has been replaced by the Autoplay button, which can be found in SpriteFrames panel next to the trashcan icon.
After you add the player’s projectile, you might notice an error in the console: Move functions do not work together with ‘sync to physics’ option. To fix this, open the Projectile scene, select the Projectile node, and uncheck the Sync to Physics
option in the Inspector.
Lessons
- Lesson 1: Getting started with Godot 4
- Lesson 2: Overview of the Godot interface
- Lesson 3: Setting up the level
- Lesson 4: Creating the player
- Lesson 5: Spawning the platforms
- Lesson 6: Creating a collectible
- Lesson 7: Creating an enemy
- Lesson 8: Handling player death
- Lesson 9: Creating the player projectile
- Lesson 10: Adding the final touches
- Lesson 11: Exporting your game and wrapping up
Lefterispap
Nov. 7, 2022 at 7:23 p.m.Hey, In my projectile script when I move it with the
move_and_collide()
method it keeps throwing errors.amit
Nov. 8, 2022 at 12:35 a.m.According to the documentation, you can’t use
move_and_collide()
with “Sync to Physics” turned on. Can you try turning off “Sync to Physics” in the inspector? Also, which version of Godot are using?