DragForce Class
adds a drag force to associated objects
Constructor
DragForce
()
Item Index
Methods
Properties
Methods
affect
(
-
object
adds an object to be affected by the generator
Parameters:
-
object
Mixedobject 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
Mixedobject 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 ]