Commit Graph

504 Commits

Author SHA1 Message Date
chris caulfield
b4488c2f8b Chaos - add FBodyInstance::bUseMACD flag to enable Motion-Aware Collision Detection per particle
- flag is also used by GeomrteyCollections
- wire flag through to Chaos particles in the ControlFlags structure

NOTE: this flag isn't actually being used yet. It will be connected to the MACD feature in an upcoming change.

#rb Benn.Gallagher

[CL 31588117 by chris caulfield in ue5-main branch]
2024-02-16 19:01:12 -05:00
chris caulfield
ffdbb6fdd6 Chaos - Resubmit 31279946 with additional fix
- fix AABB support vertex index and match Box indices to AABB indices
- fix Box GetOpposingNormal to match new indexing scheme
- unit test to verify box support vertices for all cardinal and diagonal directions
- unit test to verify that AABB and Box vertex indices match

There was a mismatch between the vertex indices on TBox versus TAABB, but also the TAABB's vertex index calculation in the support functions was incorrect. Luckily this didnt matter, but some upcoming changes now require that the Box support functions return the correct vertex index, and that requires the above two fixes.

#rb vincent.robert

[CL 31451332 by chris caulfield in ue5-main branch]
2024-02-13 17:50:33 -05:00
chris caulfield
1b5d8569b4 Undo changelist 31279946
Roll back the TAABB/TBox index fixes - it is causing some issues with box-mesh collisions.

#rb trevor.cargile

[CL 31413578 by chris caulfield in ue5-main branch]
2024-02-12 21:58:23 -05:00
vincent robert
c1896a41bd Make consistent API by using GetX, SetX, GetP and SetP for physics particles
#jira UE-202397, PLAY-14685
#rb chris.caulfield, alex.mcadams, cedric.caillaud

[CL 31383921 by vincent robert in ue5-main branch]
2024-02-12 11:12:22 -05:00
chris caulfield
5bbb6c2439 Chaos - failing EPA test case (disabled)
#rb vincent.robert

[CL 31312224 by chris caulfield in ue5-main branch]
2024-02-08 18:51:53 -05:00
chris caulfield
c94fe3d78f Chaos - fix AABB support vertex index and match Box indices to AABB indices
- unit test to verify box support vertices for all cardinal and diagonal directions
- unit test to verify that AABB and Box vertex indices match

There was a mismatch between the vertex indices on TBox versus TAABB, but also the TAABB's vertex index calculation in the support functions was incorrect. Luckily this didnt matter, but some upcoming changes now require that the Box support functions return the correct vertex index, and that requires the above two fixes.

#rb Benn.Gallagher, vincent.robert

[CL 31280110 by chris caulfield in ue5-main branch]
2024-02-07 19:32:12 -05:00
steven barnett
f11eed6059 Add soft collision thickness and sticky friction
#rb Chris.Caulfield, benn.gallagher

#changelist validated
#virtualized

[CL 31243694 by steven barnett in ue5-main branch]
2024-02-06 20:40:28 -05:00
edwin maynard
4ca314b447 [Backout] - CL31216640 (backed out due to compile errors)
[FYI] Steven.Barnett
Original CL Desc
-----------------------------------------------------------------
Add soft collision thickness and sticky friction

#rb Benn.Gallagher, Chris.Caulfield

#changelist validated
#virtualized

[CL 31219619 by edwin maynard in ue5-main branch]
2024-02-06 12:37:00 -05:00
steven barnett
3a1992c0d3 Add soft collision thickness and sticky friction
#rb Benn.Gallagher, Chris.Caulfield

#changelist validated
#virtualized

[CL 31218280 by steven barnett in ue5-main branch]
2024-02-06 12:06:07 -05:00
benn gallagher
d965e48780 Fix shutdown crash in HeadlessChaos unit test runner.
#changelist validated
#virtualized

[CL 31215804 by benn gallagher in ue5-main branch]
2024-02-06 11:05:40 -05:00
vincent robert
0d356ad0b3 Fix Warning in Headless in Chaos Vehcile and Cloth Tests
#fy alex.mcadams, bill.henderson, benn.gallagher

[CL 31182763 by vincent robert in ue5-main branch]
2024-02-05 14:01:48 -05:00
vincent robert
3563268c41 Store velocities and rotations in single precision in Physics particles
This is saving 40 bytes per particle
#rb chris.caulfield

[CL 31178234 by vincent robert in ue5-main branch]
2024-02-05 12:34:00 -05:00
vincent robert
7c6ce5ebd5 Remove deprecated warning in headless chaos
[CL 31175564 by vincent robert in ue5-main branch]
2024-02-05 11:15:43 -05:00
vincent robert
6b33991b22 Remove deprecated waning in Chaos Headless
[CL 31173340 by vincent robert in ue5-main branch]
2024-02-05 10:09:45 -05:00
chris caulfield
46dbf83fda Chaos - fix collisions being destroyed when particles are explicitly slept.
This bug prevented islands from being awoken if you explicitly set all of its particles to sleep, and then teleported one of the particles elsewhere.

This was caused by SleepParticle being called before BeginDetectCollisions. This put the particle to sleep but left the collision constraints as they were. When we prune out of date collisions they were destroyed because they were "awake" but were not updated this tick.

The fix is to update the sleep state of constraints whose islands will be put to sleep as a result of all particles being put to sleep.

#rb vincent.robert

[CL 30895513 by chris caulfield in ue5-main branch]
2024-01-25 14:29:25 -05:00
jaco vandyk
a1fe2a2c67 bugfix Chaos Overlaps: Transforms including reflection did not always function correctly
#rb vincent.robert
[FYI] Benn.Gallagher
#UDN 00712852

[CL 30693143 by jaco vandyk in ue5-main branch]
2024-01-18 14:54:09 -05:00
tom waterson
0d2af3331e Chaos - Fix for character ground constraint to handle disabling of constraint particles
#rb Chris.Caulfield

[CL 30601089 by tom waterson in ue5-main branch]
2024-01-12 14:56:06 -05:00
vincent robert
b9ef7482c5 Fix unit test, fallout from memory optimization
#fy cedric.caillaud, benn.gallagher

[CL 30412575 by vincent robert in ue5-main branch]
2023-12-20 10:43:59 -05:00
benn gallagher
4170f7ee9b Temporarily disable one rewind unit test pending changes to Chaos PT-side particle precision
#rb Benn.Gallagher
[FYI] Vincent.Robert

[CL 30261069 by benn gallagher in ue5-main branch]
2023-12-12 08:02:07 -05:00
benn gallagher
d3073a6d9c Fix Chaos event manager unit test after changes to clear out single-threaded buffers on flip
#rb Benn.Gallagher

[CL 30260859 by benn gallagher in ue5-main branch]
2023-12-12 07:43:44 -05:00
bill henderson
982f761ed2 Add modular unit tests
#rb tom.waterson

[CL 30116510 by bill henderson in ue5-main branch]
2023-12-05 08:40:41 -05:00
jaco vandyk
229e0f158b Chaos physics bug fix: When using a rotated query object for overlap queries, the rotation was not accounted for when calculating transforms
#rb Vincent.Robert
#[fyi] Benn.Gallagher, Chris.Caulfield
#jira UE-199987

#ushell-cherrypick of 29932881 by jaco.vandyk

[CL 29987160 by jaco vandyk in ue5-main branch]
2023-11-29 09:40:07 -05:00
jaco vandyk
02da785c21 Overlap bug fix: Heightfields should Normalize Initial direction vector before sending it to GJK
#rbVincent.Robert
#[fyi] Michael.Lentine, Benn.Gallagher
#jira none

[CL 29014561 by jaco vandyk in ue5-main branch]
2023-10-23 08:09:46 -04:00
vincent robert
5bf06ad1ea Convert RestCollection in single precision
- This change won't have much impact on memory when building in game, but the impact will be when loading. Also it harmonize the Dynamic Collection and the Rest Collection. And so it optimizes the access, and conversion to transforms.
- DynamicCollection has a function set back transforms to its RestCollection, and free memory
- Remove function from ManageArrayCollection makes sure to free memory now.
#rb cedric.caillaud

[CL 28721098 by vincent robert in ue5-main branch]
2023-10-12 14:40:24 -04:00
chris caulfield
379f26a007 Chaos - fix FChaosEngineInterface::SetGlobalPose_AssumesLocked for kinematics
Set the kinematic target in SetGlobalPose so that this is a teleport and velocity reset for kinematics as intended (if a teleport is not desired, the user should be calling SetKinematicTarget, not SetGlobalPose). Previously there could be problems with interpolation in async physics.

#jira UE-196442
#rb cedric.caillaud

[CL 28665908 by chris caulfield in ue5-main branch]
2023-10-11 11:25:36 -04:00