You are browsing as a guest. Sign up (or log in) to start making projects!

1h 31m 58s logged

DEVLOG - 09 i added a shotgun! the shotgun has a large cooldown + it applies force on you! + itch.io update

IF YOU DONT CARE ABOUT THE TECHNICAL STUFF WATCH THE VIDEO DOWN HERE TO JUST SEE THE COOL SHOTGUN

it was much easier to implement because all i did was add a bunch of raycasts and randomize them with this simple code:

func randomizeRays():
	var i : int = 0
	for ray in children:
		if ray is RayCast3D:
			ray.target_position.x = orgPos[i] + randf_range(-spread,spread)
			i+=1
			ray.target_position.y = orgPos[i] + randf_range(-spread,spread)
			i+=1

the actual hard part was getting both guns to work with eachother but i managed to do that
the force function was also interesting because i use a chartacterbody3d in godot i have to make this stuff myself with basically only velocity
so the code is pretty easy to understand i dont think i need to explain much

func _applyForce(point :Vector3,force , maxRange:float = 10):
	var dir = global_position - point
	var dist = dir.length()
	if dist > maxRange:
		return
	dir = dir.normalized()
	var fallOff = clamp(1 - (dist/ maxRange),0,1)
	velocity += dir * force * fallOff
	knockbackTimer = KNOCKBACK_LOCK_TIME

also the game is now updated and free on itch.io!
link:https://idotweaks.itch.io/the-way-to-tealjust-kill
(please download it its much better than the web version because i cant solve some web specific bugs)

1
61

Comments 0

No comments yet. Be the first!