Skip to content

Instantly share code, notes, and snippets.

@Andicraft
Andicraft / SecondOrderDynamics.cs
Last active May 23, 2024 05:48
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: