Surface Indictor

GearedGeek

Active member
I have created a Magic Item for my character and I'm using the Surface Indictor like the Teleport from the demo. I have noticed something with the Surface Indictor itself. If the player looks into the sky the Surface Indictor will move to 0,0,0 in the world. Here's a video,


Can we make it where it will disappear when it gets out of range? And when the Surface Indictor isn't visible then that Magic Item can't fire/used.
 
Last edited:
For this you may need to make an adjustment to MagicItem.LateUpdate - the position of the surface indicator is determined there using ProjectOnPlane, so you may want to add a check for when `position` is 0,0,0 to disable the surface indicator gameobject. Alternatively you may be able to add a simple custom script to the surface indicator object itself to enable/disable the gameobject based on its local position relative to the player.
 
I’m no programmer so creating a custom script isn’t a valid option for me. I figured that Justin could add it to a future update or if someone had created a script/modified the code already.
 
Top