Skip to content

Instantly share code, notes, and snippets.

View Andicraft's full-sized avatar

Andrea Dahnberg Andicraft

View GitHub Profile
@Andicraft
Andicraft / WrapParticles.cs
Created August 8, 2025 08:42
Particle Wrapping for Unity Shuriken
// Copyright 2025 Iron Gate Studio AB
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software
// and associated documentation files (the “Software”), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
//
@Andicraft
Andicraft / CoaCD.cs
Created September 13, 2024 13:46
CoaCD collision generation for Godot 4
using System.Runtime.InteropServices;
using Godot;
using Godot.Collections;
namespace CoACD_Godot;
/* Generates colliders using CoaCD - https://github.com/SarahWeiii/CoACD
* This is NOT a drag and drop file, but it should give you the framework you need to get started.
*
* Requires you to build the CoaCD library yourself to get the latest version.
@Andicraft
Andicraft / SecondOrderDynamics.cs
Last active July 23, 2025 16:31
Second Order Dynamics for Godot 4 in C#. Used for cool procedural animation stuff.
using System;
using Godot;
// based on https://www.youtube.com/watch?v=KPoeNZZ6H4s
// written with generics because repeating code sucks
// rough explanation of the parameters:
// --------------
// f is the frequency of the system, in hz
// things will move faster if this is high basically
@Andicraft
Andicraft / StairsCharacter.cs
Last active February 4, 2024 19:18
Stair-Stepping Character Example for Godot in C#
using Godot;
// Use this class as a base for a character controller in Godot to enable stair-stepping
//
// In your character code, simply call StairStepUp() just before MoveAndSlide(),
// and then StairStepDown() afterward.
//
// Make sure your character collider margins are set as low as possible.
// Inspired by and partially based on https://github.com/JheKWall/Godot-Stair-Step-Demo
public partial class StairsCharacter : CharacterBody3D
@Andicraft
Andicraft / ZOE-Widget.js
Last active November 16, 2020 18:36 — forked from edddeduck/ZOE-Widget.js
Scriptable iOS widget that displays the status of your Renault ZOE on your iPhone and iPad. Swedish API codes.
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: light-gray; icon-glyph: car;
// 15th November
// Corrected KM to Miles accuracy
// Added extra details about Gigya API code for different countries
// Added battery temp to ZE50 cars
// Fixed a few German errors into English
// add your my-renault account data: