Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultCompliance controls soft constraint stiffness for contact resolution. // Lower values = stiffer contacts (less penetration, potential jitter) // Higher values = softer contacts (more penetration, smoother) // Typical range: 1e-10 (very stiff) to 1e-6 (soft) // See PHYSICS_GUIDE.md for tuning guidelines. DefaultCompliance = 1e-7 )
Variables ¶
This section is empty.
Functions ¶
func ComputeDynamicFriction ¶
func ComputeRestitution ¶
func ComputeStaticFriction ¶
Types ¶
type Constraint ¶
type ContactConstraint ¶
type ContactConstraint struct {
BodyA *actor.RigidBody
BodyB *actor.RigidBody
Points []ContactPoint
Normal mgl64.Vec3
}
func (*ContactConstraint) SolvePosition ¶
func (c *ContactConstraint) SolvePosition(dt float64)
SolvePosition resolves penetration (PBD style, no lambda accumulation)
func (*ContactConstraint) SolveVelocity ¶
func (c *ContactConstraint) SolveVelocity(dt float64)
SolveVelocity applies restitution
type ContactPoint ¶
Click to show internal directories.
Click to hide internal directories.