Skip to content

Instantly share code, notes, and snippets.

View pramser's full-sized avatar

Patrick Ramser pramser

View GitHub Profile
@pramser
pramser / RayState.hx
Last active May 16, 2025 12:06
A sample of character movement in HaxeFlixel that casts a ray to the right-side of the screen that should collide with a wall
package;
import flixel.FlxG;
import flixel.FlxSprite;
import flixel.FlxState;
import flixel.addons.nape.FlxNapeSpace;
import flixel.addons.nape.FlxNapeSprite;
import flixel.util.FlxColor;
import nape.geom.Ray;
import nape.geom.Vec2;