Constrains an Entity to a circle

Constructor

@:value({ match_angle : true })new (center:Vec2, angle:Float, radius:Float, match_angle:Bool = true)

Create a new constraint that will place an object on the given angle of a circle with a given radius

Parameters:

center

the center point of the circle

angle

the angle at which to place the entity

radius

the radius of the circle

match_angle

whether or not to update the entity's angle to match it's relation to the center

Variables

Methods

inlineupdate_angle (a:Float):Void

Update the position of the Entity using a given angle

Parameters:

a

angle

update_position (angle:Float, radius:Float):Void

Update the position of the Entity using a given angle and radius

Parameters:

angle
null

radius

inlineupdate_radius (r:Float):Void

Update the position of the Entity using a given radius

Parameters:

r

radius

Inherited Variables

Defined by Component

@:value(true)active:Bool = true

Whether or not this component gets updated

Inherited Methods

Defined by Component

get_name ():String

returns the name of this component

get_priority ():Int

returns the priority of this component

has_tag (tag:String):Bool

Returns whether or not this component is tagged with given tag

Parameters:

tag

Returns:

Bool return tags.indexOf(tag) >= 0

on_add ():Void

Called when added to an entity

on_remove ():Void

Called when removed from an entity

set_priority (value:Int):Void

sets the priority of this component

Parameters:

null

value