Skip to content

Instantly share code, notes, and snippets.

View Lassi-Koykka's full-sized avatar
:shipit:
👨‍💻

Lassi Köykkä Lassi-Koykka

:shipit:
👨‍💻
View GitHub Profile
@Lassi-Koykka
Lassi-Koykka / player_juice_component.gd
Created January 24, 2024 10:07
Simple Godot first-person weapon sway, bob and tilt component
class_name PlayerJuiceComponent extends Node
@onready var player: Player = get_parent()
@export_group("General")
@export var LERP_SPEED: float = 10
@export_group("Bob")
@export var BOB_AMPLITUDE: Vector2 = Vector2.ONE * 0.01;
@export var BOB_FREQ: Vector2 = Vector2.ONE * 0.01;
@export_group("Tilt")
@export var HEAD_ROTATION_AMOUNT: float = 0.04;
@Lassi-Koykka
Lassi-Koykka / player.gd
Last active January 24, 2024 10:08
Simple Godot first-person character controller which also handles climbing stairs
class_name Player extends CharacterBody3D
@onready var head: Node3D = $Head
@onready var arms: Node3D = $Head/Camera3D/Arms
@onready var head_default_pos: Vector3 = head.position
@onready var arms_default_pos: Vector3 = arms.position
@export var SPEED: float = 10
@export var JUMP_VELOCITY: float = 4.5
@export var HEAD_LERP_SPEED: float = 10
@export var MAX_STEP_HEIGHT: float = 0.3
@Lassi-Koykka
Lassi-Koykka / dilbert.zsh
Last active May 13, 2023 03:17
A small zsh script for getting and displaying Dilbert comics in kitty terminal
# DILBERT
# Add this to your .bashrc or if you are using oh-my-zsh add a functions.zsh file under your oh-my-zsh/custom folder.
# Requirements:
# - Kitty terminal
# - ripgrep
# - ImageMagick
function dilbert () {
officialUrl=https://dilbert.com
@Lassi-Koykka
Lassi-Koykka / xkcd.zsh
Last active March 24, 2022 14:29
A simple Zsh/Bash function for getting and displaying a random xkcd comic in the Kitty terminal
# XKCD
# Add this to your .bashrc or if you are using oh-my-zsh add a functions.zsh file under your oh-my-zsh/custom folder.
# Requirements:
# - Kitty terminal
# - jq
# - ImageMagick
function xkcd () {
comicNum=$1