set guide entity||doc135482

September 20, 2022

Format

 Entity:setGuideTarget1(targetEntity, texName, speed) 
  • The class to which the function belongs:Entity

Description

Displays arrow guides and points to solid objects.


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
targetEntity Entity Directing the target entity
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 client sideglobal scriptGenerate solid in , show arrow guide and point to it

local pos = Lib.v3(1,1,1)
local createParams = { cfgName = "myplugin/entity1", pos = pos }
local entity = EntityClient.CreateClientEntity(createParams)
Me:setGuideTarget1(entity, 'arrow.png', 0.05)