LaserGun without collisions

This commit is contained in:
Morph01
2024-08-14 18:46:31 +02:00
parent ef0bcd0a35
commit b92c5169c4
12 changed files with 161 additions and 6 deletions

View File

@@ -1,9 +1,13 @@
#pragma once
#include <godot_cpp/classes/animation_player.hpp>
#include <godot_cpp/classes/camera3d.hpp>
#include <godot_cpp/classes/character_body3d.hpp>
#include <godot_cpp/classes/input_event_mouse_motion.hpp>
#include <godot_cpp/classes/node3d.hpp>
#include <godot_cpp/classes/packed_scene.hpp>
#include <godot_cpp/classes/ray_cast3d.hpp>
#include <godot_cpp/classes/ref.hpp>
namespace blitz {
@@ -24,6 +28,10 @@ class FirstPersonPlayer : public godot::CharacterBody3D {
private:
godot::Camera3D* m_Camera;
godot::Node3D* m_Head;
godot::AnimationPlayer* m_WeaponAnimation;
godot::RayCast3D* m_GunBarrel;
godot::Node* m_BulletInstance;
godot::Ref<godot::PackedScene> m_BulletScene;
float m_BobTime;
float m_Speed;