Constructor
new Movable(xopt, yopt, aopt)
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
x |
number |
<optional> |
0
|
|
y |
number |
<optional> |
0
|
|
a |
number |
<optional> |
0
|
Classes
Methods
applyForce(force, armopt, inv_mass, inv_inertia)
- Description:
- Applies a force to a body affecting its direction of travel and rotation.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
force |
Vector2 | The force to be applied. | |
arm |
Vector2 |
<optional> |
The collision arm. |
inv_mass |
number | ||
inv_inertia |
number |
applyImpulse(impulse, armopt, inv_mass, inv_inertia)
- Description:
- Applies a force to a body affecting its direction of travel and rotation.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
impulse |
Vector2 | The force to be applied. | |
arm |
Vector2 |
<optional> |
The collision arm. |
inv_mass |
number | ||
inv_inertia |
number |