User Tools

Site Tools


4rpl:commands:setbeamforcelocalend

Index
Beams

SetBeamForceLocalEnd

SetBeamForceLocalEnd(<-beamUID <-forceLocalEnd)

Description

When set to true on a beam, the beam will use local coordinates for the end point when attached to a unit. Normally, the end point of a beam is always in global coordinates even when the beam is attached to a unit. If you want the end point to also be relative to the unit, then SetBeamForceLocalEnd to true.

Examples

once
   GetUnitPosition(self) ->unitPos
   #Fire a beam to extends off screen but is at the same height as the unit
   #We will attach the beam to ourselves, so that the start point is relative to our unit
   3 ->brightness
   4 ->width
   CreateBeam("orange" <-brightness <-width) ->beam
   AttachBeam(<-beam self "")
   SetBeamStart(<-beam V3(0 0 0))
   SetBeamEnd(<-beam V3(10000 0 10000))
endonce
 
SetBeamForceLocalEnd(<-beam true)
SetBeamEnd(<-beam 10 1 10)

Index

4rpl/commands/setbeamforcelocalend.txt · Last modified: 2021/04/15 12:28 by Karsten75