Stabilize PACS convex-corner sliding for static and border contacts#770
Stabilize PACS convex-corner sliding for static and border contacts#770
Conversation
Co-authored-by: kaetemi <1581053+kaetemi@users.noreply.github.com>
Co-authored-by: kaetemi <1581053+kaetemi@users.noreply.github.com>
|
@copilot Can you give a primer/walkthrough on why the original implementation had this behavior, and how your adjustment actually fixes this? |
In the original code, slide always injected a normal “push-back” term ( In The same commit also clamps remaining time with an epsilon ( |
|
@copilot I tried this and it does not fix the issue. For clarity, this occurs when running/sliding against objects (buildings, etc) that are placed in the landscape. Particularly, the outer edge. |
Co-authored-by: kaetemi <1581053+kaetemi@users.noreply.github.com>
Co-authored-by: kaetemi <1581053+kaetemi@users.noreply.github.com>
I’ve added a follow-up specifically on the static/landscape collision path used by placed objects in The static collision scheduling in It now only applies that time backoff when movement is actually inward along the contact normal (with a small epsilon), so tangential edge sliding no longer gets unnecessary time rewinds. |
PACS movement could stutter when sliding along convex border corners, while concave corners remained smooth. This was caused by unstable normal-axis corrections during corner-adjacent contacts and by overly aggressive static collision time backoff on tangential outer-edge glancing.
Collision-response stability update (PACS)
CPrimitiveWorldImage::reaction(...), clamp remaining collision time used in response math:safeRemainingTime = max(dt - contactTime, 1e-6)Slide behavior correction at corner contacts
Slidereactions, apply distance-back normal push only when velocity is directed into the contact normal (speedProj < 0).Static collision scheduling correction (placed landscape objects / outer edges)
CMoveContainer::newCollision(...)(static surface path), collision-time backoff is no longer based on total speed magnitude for all contacts.inwardVelocity = -(ContactNormal · Speed)NELPACS_COLLISION_TIME_EPSILONScope
nel/src/pacs/primitive_world_image.cppnel/src/pacs/move_container.cppOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.