(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)

**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.99 mb) **


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

Enjoy!

:)