Is their an easy method to check the distane from an object eg: an airdrop to the ground?
Check distance from ground?Solved
Vector3.Distance(drop.transform.position, TerrainMeta.HeightMap.GetHeight(drop.transform.position))if this is about your supply drop effect on landing plugin you will probably have to add a custom component to the supply drop, else when are you going to check the drop's distance to the ground?
runescape
Vector3.Distance(drop.transform.position, TerrainMeta.HeightMap.GetHeight(drop.transform.position))
if this is about your supply drop effect on landing plugin you will probably have to add a custom component to the supply drop, else when are you going to check the drop's distance to the ground?
effectivly, what im trying to do is say when distance from ground < 50, trigger a function.
if you want it to affect all supply drops you can use OnSupplyDropLanded to trigger to effect. the problem with, for ex., trying to trigger it only on a specific drop you will have to add something like a fixed timer to run the effect, or, attach a component that can check the distance multiple times while the drop is in the air.
Locked automatically