Add soft-body, cloth, or chain physics to a Unity game using the Verlet integration system.
Animate a character arm or robotic limb reaching a target using the CCDIK or FABRIK inverse kinematics solver.
Speed up nearest-neighbor lookups in a 3D Unity scene with the spatial hashing system.
Smooth noisy sensor or controller input data using the included Kalman filter.
Requires Unity game engine, copy the relevant subfolder directly into your Unity project Assets folder.
MathUtilities is a collection of math and physics algorithms implemented in C# for the Unity game engine. The author describes it as a grab bag of techniques gathered over several years, and the code is free to use however you like. The collection covers a wide range of problems that come up in game development and simulations. One tool handles mesh deformation, bending and warping 3D shapes in real time based on control points you place, with adjustable rigidity. Another implements signed distance fields, a technique for representing and rendering solid 3D shapes by storing how far each point in space is from the nearest surface. There is an implementation of the Kabsch algorithm, which finds the best rotation and position to align two sets of points with each other, and a least-squares fitter for finding the line or plane that best fits a cloud of points in 3D space. The physics-related tools include a Verlet integration system for simulating soft bodies, rigid bodies, cloth, and chains of linked particles. A Kalman filter implementation is included for smoothing noisy sensor data by combining signals from multiple sources into a cleaner result. The collection also has inverse kinematics solvers, which are algorithms for figuring out how a chain of jointed limbs (like a robotic arm) should position itself to reach a target point. Two different IK approaches are included: CCDIK and FABRIK, with illustrated examples for each. Other items in the collection include a general-purpose numerical optimizer, a linear assignment solver for pairing items between two lists at minimum cost, and a spatial hashing system for fast proximity lookups in 3D space. A fisheye camera prefab stitches together four camera views into a single 180-degree image. All examples run in Unity and each item in the collection links to its own subfolder with source code and animated demonstrations.
← zalo on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.