Powerful Node To Find PhysX-accurate Distances Between Collision Surfaces!
Dear Community,
I’ve just released two new nodes to help you with of your** collsion surface distance checks**!
These nodes let you easily tell how far a given point is from the actual PhysX surface of any UE4 game with collision / primitive component!
I’ve even given you a node that let’s you directly check the distance between the physical surfaces of two objects!
See pics!
These nodes work with Characters and Skeletal Mesh actors that have physics assets!
**Distance Between Surfaces Of Two Objects**
![42686311a9773f2c63184ad34db5dc74c22ddbb9.jpeg|1280x960](upload://9tt9ZqijKdAvdmhpjpNvdh9ahU5.jpeg)
**World Point Distance To Collision Of Any **
**My C++ For You**
Here's the C++ code for my algorithm to get the distance between the colliding surfaces of any two objects!
```
float UVictoryBPFunctionLibrary::GetDistanceBetweenComponentSurfaces(UPrimitiveComponent* CollisionComponent1, UPrimitiveComponent* CollisionComponent2, FVector& PointOnSurface1, FVector& PointOnSurface2)
{
if(!CollisionComponent1 || !CollisionComponent2)
{
return -1;
}
//Closest Point on 2 to 1
CollisionComponent2->GetDistanceToCollision(CollisionComponent1->GetComponentLocation(), PointOnSurface2);
//Closest Point on 1 to closest point on surface of 2
return CollisionComponent1->GetDistanceToCollision(PointOnSurface2, PointOnSurface1);
}
_
```
**Latest plugin download on the UE4 Wiki: (15.22 mb) **
Not using the latest engine version? Check out my wiki section on which plugin release dates go with which engine version!
Plugin Release Date and UE4 Engine Versions
**Victory Plugin on Media Fire**
If your browser is not updating the Wiki download page to the most recent version, you can use my alternative Media Fire download link!
Please note clicking link will not start a download instantly, it will just take you to the Media Fire file description.
https://www.mediafire.com/?g6uf9kt5ueb2upj
Note on Packaging Victory Plugin
Enjoy!