Skip to content

Instantly share code, notes, and snippets.

View sinewavey's full-sized avatar

Vera Lux sinewavey

View GitHub Profile
@sinewavey
sinewavey / physics_interpolation_3d.cpp
Last active July 8, 2024 16:16
3D physics interpolation for Godot with GDExtension C++
#include "physics_interpolation_3d.h"
#include <godot_cpp/core/class_db.hpp>
#include <godot_cpp/variant/utility_functions.hpp>
using namespace godot;
void PhysicsInterpolation3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("_update_xform_cache"), &PhysicsInterpolation3D::_update_xform_cache);
ClassDB::bind_method(D_METHOD("set_interp_mode", "mode"), &PhysicsInterpolation3D::set_interp_mode);
@sinewavey
sinewavey / bezier_sample
Last active June 8, 2024 21:02
Generalized Bezier Patch Generation in GDScript
@tool
extends Node
@export var inputs: Array[Marker3D]
@export_range(0, 1, 1, "or_greater") var resolution: int = 0
@export_range(1, 50, 1, "or_greater") var process_tick: int = 25
@export var build: bool
@export var show_only_inputs := true