Class: A_Attract

b5. A_Attract


new b5.A_Attract(target, container, min_dist, max_dist, strength, stop, bounce){b5.A_Attract}

actions/generic/attractor.js, line 203

Action that pulls objects towards or repels objects away on the x and y-axis that are within a specific range, does not exit

Created actions should be added to an actor or scenes actions list to be processed

For a complete overview of Actions see Booty5 Actions Overview

Name Type Description
target string:b5.Actor

Path to or instance of actor object that will attract other objects

container b5.Actor | b5.Scene

Path to or instance of object that contains the actors (actors that can be attracted have attract property set to true)

min_dist number

Minimum attraction range

max_dist number

Maximum attraction range

strength number

Strength of attraction, negative for repulsion

stop boolean

If set to true then attracted objects will stop when they hit the min distance range

bounce boolean

If set to true then objects when stopped at the min distance range will bounce

Type Description
b5.A_Attract The created action