I have a bit of code where I have random meshes spawning at certain locations that’s inside a vector array. How can I do it so meshes will spawn only if they’re within a certain distance of the player? This is what I have so far
Just measure the distance to the player:

ive not used that node before, so I just put my player location in the top one and say 100 in the x y and z, it outputs an int, how can I use that?
You just put two vectors ( coordinates ) in, and it give you the distance between them, exactly what you want.
One is one of your vectors, the is just:
You could create a sphere collision actor with the desired radius and use that to spawn the mesh on begin overlap.
Thanks guys, i’ll give it a go!

