
Click Here to Dowload Godot
Click Here to Dowload our First Person Player Controller


Basic Player Controller, allows user to move around and freelook
Click here to download assets











At the top of the player script with the other variables
make a refernce to the rifle and the raycast
extends CharacterBody3D
const SPEED = 5.0
const JUMP_VELOCITY = 6.5
const MOUSE_SENSETIVITY = 0.1
# ADDED CODE
@onready var gun_anim = $Camera3D/Rifle/AnimationPlayer
@onready var gun_barrel = $Camera3D/Rifle/RayCast3D
## Handle Shooting
if Input.is_action_pressed("shoot"):
if !gun_anim.is_playing():
gun_anim.play("Shoot")













At the top with the gun_anim and gun_barrel variables add two new variables
var bullet = load("res://Scenes/bullet.tscn")
var instance
@onready var gun_anim = $Camera3D/Rifle/AnimationPlayer
@onready var gun_barrel = $Camera3D/Rifle/RayCast3D
## Handle Shooting
if Input.is_action_pressed("shoot"):
if !gun_anim.is_playing():
gun_anim.play("Shoot")
instance = bullet.instantiate()
instance.position = gun_barrel.global_position
instance.transform.basis = gun_barrel.global_transform.basis
get_parent().add_child(instance)
extends Node3D
const SPEED = 40.0
@onready var mesh = $MeshInstance3D
@onready var ray = $RayCast3D
@onready var particle = $GPUParticles3D
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
position += transform.basis * Vector3(0,0, -SPEED) * delta
if ray.is_colliding():
mesh.visible = false
particle.emitting = true
await get_tree().create_timer(1.0).timeout
queue_free()
func _on_timer_timeout() -> void:
queue_free()

var bullet = load("res://Scenes/bullet.tscn")
var instance
@onready var gun_anim = $Camera3D/Rifle/AnimationPlayer
@onready var gun_barrel = $Camera3D/Rifle/barrel
@onready var player_ray = $RayCast3D
Replace the instance.transform.basis = gun_barrel.global_transform.basis piece of code with
var hit_point = player_ray.global_transform.origin + (-player_ray.global_transform.basis.z * 40.0)
var dir = (hit_point - gun_barrel.global_position).normalized()
if player_ray.is_colliding():
hit_point = player_ray.get_collision_point()
dir = (hit_point - gun_barrel.global_position).normalized()
instance.transform.basis = Basis().looking_at(dir, Vector3.UP)



func _process(delta: float) -> void:
position += transform.basis * Vector3(0,0, -SPEED) * delta
if ray.is_colliding():
mesh.visible = false
particle.emitting = true
## NEW CODE ADDED HERE
var collider = ray.get_collider()
if collider is RigidBody3D:
print("Hit RigidBody3D")
collider.apply_impulse((transform.basis * Vector3(0, 0, -1)).normalized() * 3)
#elif collider is Enemy:
# collider.takeDmg(1)
### NEW CODE END
await get_tree().create_timer(1.0).timeout
queue_free()




class_name Enemy
extends CharacterBody3D
var currentHP = 50
func takeDmg(dmg: int) -> void:
currentHP = currentHP -1
print(currentHP)
if currentHP <= 0:
queue_free()
The could should look like this
var collider = ray.get_collider()
if collider is RigidBody3D:
print("Hit RigidBody3D")
collider.apply_impulse((transform.basis * Vector3(0, 0, -1)).normalized() * 3)
elif collider is Enemy:
collider.takeDmg(1)
✅ Intro to Godot
✅ Introduction to Game Engines
❓ Checked in?!?

As you know this is Solly the seal. You may also have noticed that Solly is always waving alone at the end of very workshop, it is because he is single, a fate for those working for a Triple A company.
A contributing fact to the fate of those working for a Triple A comanpy, is that they have 0 rizz when it comes to clothing. Look at Solly, other than the depression and mental instability you may have also noticed he is not wearing any clothes. This is because he is both broke and has no time to shop.
So it's time to make a difference, help the make a difference; fight against destiny and break Solly out of the cycle. Check-in on BullsConnect to convice USF we are an impactful club and so they will provide us with funding so we can get Solly some rizz by buying him clothes.