A drivable minivan from the Prop Builder. What This Module Does
An extension of Reactor3D (reactor_3d.js): in the game from scriptUrls, in the editor from Reactor3D.EXTENSIONS, in Node by the core's own tail. It names no game global unguarded.
Classes & Namespaces
Design Notes from the Source Code
An extension of Reactor3D (reactor_3d.js): in the game from scriptUrls, in the editor from Reactor3D.EXTENSIONS, in Node by the core's own tail. It names no game global unguarded.
Reactor3D.Vehicles holds what is true of a vehicle whatever drives it:
KINDS, typeOf(record) a kind's defaults; a type record with every
field filled
read, guess, findFront, the vehicle block of a model's sidecar
findWheels (3d/<model>/model.json), normalized; what is
guessed where the file says nothing
step(state, input, type, the handling arithmetic: one logic tick of
env, dt) steering and speed, pure
inputs, pose, heading, what a ridden vehicle's model is drawn from:
pointWorld the part inputs, its attitude, its points
Model space is the space pivots and carve pivots use: the model centered on x and z, standing on y = 0, in the file's own units. A heading is radians, 0 north, clockwise seen from above; on the map it points along (sin(yaw), -cos(yaw)). Pitch is radians, nose up positive. Lean is radians, positive to the vehicle's right.
The game's files write the ride onto characters as saved fields (_rrYaw, _rrPitch, _rrLean, _rrSteer, _rrTravel, _rrSpeed, _rrPose, _rrBoarded on the vehicle's event; _rrSeated, _rrMount, _rrRide, _rrDrive on the rider). This file only reads them.
View reactor_3d_vehicles.js on GitHub · Hide internal (_) functions