API Docs for: GoblinPhysics
Show:

DragForce Class

adds a drag force to associated objects

Constructor

Methods

affect

(
  • object
)

adds an object to be affected by the generator

Parameters:

  • object Mixed

    object to be affected, must have applyForce method

applyForce

()

applies force to the associated objects

disable

()

disables the force generator

enable

()

enables the force generator

unaffect

(
  • object
)

removes an object from being affected by the generator

Parameters:

  • object Mixed

    object to be affected, must have applyForce method

Properties

affected

Array private

array of objects affected by the generator

Default: []

drag_coefficient

Number

drag coefficient

Default: 0

drag_coefficient

Number

drag coefficient

Default: 0

enabled

Boolean

whether or not the force generator is enabled

Default: true

force

Vec3

force which will be applied to affected objects

Default: [ 0, 0, 0 ]