using System.Numerics; namespace AcDream.Core.Physics; /// /// Result of : the validated /// position after collision, the cell the entity ended up in, /// and whether they're standing on a surface. /// /// /// L.3a (2026-04-30): added optional collision-normal fields so the /// caller (typically ) /// can apply retail's velocity-reflection bounce /// (v_new = v - (1 + elasticity) * dot(v, n) * n) to the /// PhysicsBody after the geometric resolve completes. ACE port mirror: /// references/ACE/Source/ACE.Server/Physics/PhysicsObj.cs:2692-2697; /// retail equivalent: CPhysicsObj::handle_all_collisions at /// acclient_2013_pseudo_c.txt:282699-282715. /// /// public readonly record struct ResolveResult( Vector3 Position, uint CellId, bool IsOnGround, /// True when a wall collision occurred during this resolve /// and is meaningful. bool CollisionNormalValid = false, /// Outward surface normal of the wall the sphere hit. Used /// by the velocity-reflection step. Pointing away from the wall. Vector3 CollisionNormal = default, /// Render Residual A — whether the underlying /// FindTransitionalPosition found a valid position (retail /// find_valid_position != 0, pc:273898). False when the sweep had no /// start cell or was immediately stuck. The camera SweepEye reads this /// to trigger SmartBox::update_viewer's fallbacks. Default true /// so existing callers are unaffected. bool Ok = true);