BoxCollison's OnComponentHit event is not triggered when BoxCollison hits a spawned actor with simulate physics enabled. The event is triggered if the same actor has been placed in the level beforehand.
Workaround Code in UE5.1
PhysScene_Chaos.cpp FPhysScene_Chaos::HandleCollisionEvents(const Chaos::FCollisionEventData& Event) // Get swapped velocity deltas const FVector& DeltaVelocity1 = bSwapOrder ? CollisionDataItem.DeltaVelocity2 : CollisionDataItem.DeltaVelocity1; const FVector& DeltaVelocity2 = bSwapOrder ? CollisionDataItem.DeltaVelocity1 : CollisionDataItem.DeltaVelocity2; NotifyInfo.Info0.SetFrom(GetBodyInstanceFromProxyAndShape(PhysicsProxy0, bSwapOrder ? CollisionDataItem.ShapeIndex2 : CollisionDataItem.ShapeIndex1), DeltaVelocity1); NotifyInfo.Info1.SetFrom(GetBodyInstanceFromProxyAndShape(PhysicsProxy1, bSwapOrder ? CollisionDataItem.ShapeIndex1 : CollisionDataItem.ShapeIndex2), DeltaVelocity2);
1. Open attached project.
2. The vehicle moves forward and collides with a "Spawned" Box.
Both box and car detected OnComponentHit event and logged.
3. The vehicle moves forward and collides with a "Placed" Box.
The box detects OnComponentHit event and logs, but the car does not detect the OnComponentHit.
I am not able to find world outliner how to enable it?
How can i modify the param name in EQS node
How to achieve HLSL Multiple Render Target in Material blueprints?
What method is used to fill polygonal regions when drawing spline mesh at run time?
What controls of umg have mouse wheel events in UE4.27?
Why does the REMOVE method of map container remove elements have memory leaks?
Why does the system plugin 'UnrealBuildTool' error could not be found when the project is compiled?
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-177833 in the post.
4 |
Component | UE - Simulation - Physics |
---|---|
Affects Versions | 5.1 |
Target Fix | 5.6 |
Created | Feb 20, 2023 |
---|---|
Updated | Oct 25, 2024 |