User Guide
280 APPENDIX E
verticalSpeed
the Actor’s vertical velocity, facing the Actor’s current direction for this rendered frame
theActor.verticalSpeed += 20; // Jump straight up
enableVerticalThrusters
If enableVerticalThrusters is set to true, then holding down the shift key while using the up-arrow key reverses
the direction of gravity. If gravity is off then the up and down arrows affect the actor’s vertical velocity.
theActor.enableVerticalThrusters = true;
gravity
Gravity for theActor is now exposed as a single scalar acceleration value in feet per second, per second (default =
32). This acceleration is applied in the ‘Y’ direction of world space coordinates. Gravity will not be applied if the
user has disabled gravity in the user preferences (located on the right-click context menu). Lastly, gravity may be
forced ‘on’ for your world using the boolean properties described further below.
// Reduce gravity for this particular world.
theActor.gravity = 16;
forcedCollideSetting
If ignoreCollidePreference is set to true, the value of forcedCollideSetting determines whether collisions are
enabled
// To force collisions to be on,
// independent of the control panel setting:
theActor.ignoreCollidePreference = true;
theActor.forcedCollideSetting = true;
// To force collisions to be off
// independent of the control panel setting:
theActor.ignoreCollidePreference = true;
theActor.forcedCollideSetting = false;
ignoreCollidePreference
If set true, this overrides the user’s collide preference and enables collisions based on the value of
forcedCollideSetting.
// To use the collide preference from the control panel:
theActor.ignoreCollidePreference = false;
// To force collisions to be on,
// independent of the control panel setting:
theActor.ignoreCollidePreference = true;
theActor.forcedCollideSetting = true;
// To force collisions to be off,
// independent of the control panel setting:
theActor.ignoreCollidePreference = true;
theActor.forcedCollideSetting = false;










