atl/sm/areatrigger
import "atl/sm/areatrigger"Area triggers (sm.areaTrigger): volumes that report what enters, stays in and leaves them.
Functions
Section titled "Functions"func Filter(name string) intA trigger filter value by name (sm.areaTrigger.filter[name]).
func CreateBox(size, position sm.Vec3, o Options) sm.AreaTriggerfunc CreateSphere(radius float64, position sm.Vec3, o Options) sm.AreaTriggerfunc CreateCylinder(radius, halfLength float64, position sm.Vec3, o Options) sm.AreaTriggerA box, sphere or cylinder at a world position.
func AttachedBox(host atl.Wrapper, size, offset sm.Vec3, o Options) sm.AreaTriggerfunc AttachedSphere(host atl.Wrapper, radius float64, offset sm.Vec3, o Options) sm.AreaTriggerfunc AttachedCylinder(host atl.Wrapper, radius, halfLength float64, offset sm.Vec3, o Options) sm.AreaTriggerA box, sphere or cylinder attached to a shape, character, harvestable or other host, moving with it.
func CreateHull(hull string, position sm.Vec3, o Options, world sm.World, proxyType *int) sm.AreaTriggerA trigger shaped like a collision hull (hull is a mesh path); proxyType is sm.areaTrigger's proxy type.
func AttachedHull(host atl.Wrapper, hull string, offset sm.Vec3, o Options, proxyType *int, bone string) sm.AreaTriggerA hull trigger attached to a host, optionally to one of its bones.
Options
Section titled "Options"type Options struct { Rotation sm.Quat Filter *int UserData atl.Value IgnoreCharacters bool IgnoreShapes bool IgnoreHarvestables bool}Creation options shared by every trigger shape. Triggers detect characters, shapes and harvestables unless the matching Ignore* is set.