The engine provides both 2D and 3D math/physics support, including various collision shapes Axis-Aligned Bounding Box (AABB), Oriented Bounding Box (OBB), Capsule, Disc/Sphere, Cylinder, Plane, raycasting, and essential mathematical operations like easing functions, vector products, matrix and quaternion math.Â
The engine provides capabilities to detect collisions between shapes by calculating the closest points between them and determining if points lie within shapes. When handling physics interactions, the engine offers multiple response options: it can separate overlapping shapes by pushing them apart, calculate and apply reflection vectors to change velocity upon impact, or manage collisions through impulse forces and resting contact forces.
Detecting nearest points for 2D shapes
Physics Response of disc to other 2D shapes
Collision detection with 3D shapes
Physics Response with 3D shapes
3D Collision Detection between Capsule and AABB
Bounce Disc out of Point function
The system provides support for raycasting with primitive shapes, utilizing dot product calculations for optimal performance. This feature enables efficient intersection detection between rays and basic 3D shapes, making it an effective tool for real-time rendering applications.Â
Raycast vs Sphere 2D
Raycast vs Line Segment 2D
Raycast vs AABB 2D
Raycast vs AABB 3D
Raycast vs OBB 3D
Raycast vs Cylinder 3D
Raycast vs Sphere 3D
Raycast vs AABB 2D
Raycast vs Sphere 3D
The engine comes with several built-in easing functions that help create smooth animations. These include different variations of SmoothStart (2-6), SmoothStop (2-6), SmoothStep (3-5), and Hesitate (3-5). For more customized motion control, users can define their own easing using CubicBezier and CubicHermite curves. The engine also features Catmull-Rom splines, which are particularly useful when you need to create smooth paths through multiple points. These advanced curve options make it possible to create sophisticated animations and handle various other use cases that require precise motion control.Â
Visualizing Easing, Curves, and Splines
Curves and Splines class