(39) 's Extra Blueprint Nodes for You as a Plugin, No C++ Required!

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**

![6b63e52de9205cb6a07392fec3226bdf5fb84299.jpeg|1273x835](upload://fk173M0m6T8zQVYU8Estu6uKiUh.jpeg)

![SurfaceDistanceBetweenBP.jpg|1275x712](upload://ywRLLph4drEwZXiZR6GnrLeasFk.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: (7.16 mb) **

Not using the latest engine version? Check out my wiki section on which plugin release dates go with which engine version!

Plugin Release Dates and UE4 Engine Versions


**Victory Plugin Binaries for Packaged Games**

https://wiki.unrealengine.com/File:VictoryPluginPackaged.zip

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 the mediafire version includes both the editor and packaged game binaries in the same file :heart:


**Donations**

Donations can be sent to me via:
http://lightningfitness.org/donate/

Enjoy!

:)