Set guide coordinates||doc135481

September 20, 2022

Format

 Entity:setGuideTarget(targetPosition, texName, speed) 
  • The class to which the function belongs:Entity

Description

The arrow guide line is displayed and points to the target coordinate point.


Precautions

  • Image resources should be placed in the asset folder and its subdirectories (it is recommended that all images be placed in a unified folder for easy management)
  • The texName parameter requires the image name plus a suffix, such as 'arrow.png'

Parameters

Variable name type Description
targetPosition Vector3 guide target location
texName string Arrow sample
speed float Arrow's guidance speed, range 0 ~ 0.05
notFace2Camera boolean Is it always away from the camera


Code Samples

on the object clientmount script, the arrow wire is displayed and points to the coordinate point (1, 1, 1)

local pos = Lib.v3(1,1,1)
this:setGuideTarget(pos, 'arrow.png',0.05)