VehicleGuides

Package: Libraries.Interface.Controls.Scenes.Items · Inherits from: Libraries.Interface.Item3D, Libraries.Interface.Item, Libraries.Language.Object, Libraries.Game.Graphics.Model

The VehicleGuides are the scene editor's lines over a model with a Vehicle controller, drawn while the model is selected: the outline of the physics box (light blue), an arrow out of the front, each wheel as a circle where it hangs with the car's weight on it (orange for the steering wheels, yellow for the others), each spring as a green line down its rest length from its mount, and, if the camera follows the car, a pink cross where the game's camera starts. They are an editor helper, not a scene item, and let clicks through.

Example Code

use Libraries.Interface.Controls.Scenes.Items.VehicleGuides
use Libraries.Game.Scenes.VehicleControllerSettings
use Libraries.Game.Graphics.Model

Model car
car:Load("Car/ToyCar.gltf")
VehicleControllerSettings settings
settings:FitToModel(car)
VehicleGuides guides
guides:Place(car, settings)

Actions

Follow()

This action puts the guides where the car's body is now and turns them as it is, such as each frame while the model is moved or turned.

Place(Libraries.Interface.Item3D model, Libraries.Game.Scenes.VehicleControllerSettings settings)

This action draws the guides for a model and its vehicle settings. The lines are made around the car's own middle, again only when a setting changes, then put where the car is (Follow).

Parameters

Refresh()

This action puts the guides where the car is again, such as after the model was moved.

Inherited Actions

112 actions from Libraries.Game.Graphics.Model
62 actions from Libraries.Interface.Item
211 actions from Libraries.Interface.Item3D
3 actions from Libraries.Language.Object