The changing parts are "alternate geometry".
In the figureResFile, the geometry of actors "sparewheel" and "pillion" is a single tiny polygon "p_dummy" inside the Vespa body. The "p_dummy" geometry is invisible.
actor sparewheel:1
{
storageOffset 0 0 0
geomHandlerGeom 13 p_dummy <--- tiny single polygon
}
actor pillion:1
{
storageOffset 0 0 0
geomHandlerGeom 13 p_dummy
}
There are extra geometries for the pillion, the spare wheel, and the rack to mount the spare wheel.
In the respective actors, for example "pillion", there is an "alternateGeom" instruction to load the pillion geometry. There is also a "geomChan" channel which displays a dial to choose the alternate geometry.
actor pillion:1
{
name pillion
on
bend 0
dynamicsLock 0
hidden 0
addToMenu 1
castsShadow 1
includeInDepthCue 1
parent vespabody:1
alternateGeom pillion
{
name pillion
objFile 1003 :Runtime:Geometries:vspscooter:pillion3.obj <--- the alternate geometry
}
channels
{
geomChan pillion <--- choose alternate geometry
{
uniqueInterp
name (pillion)
initValue 0
hidden 1
forceLimits 4
min 0
max 1
trackingScale 0.045
keys
{
static 1
k 0 0
}
interpStyleLocked 1
staticValue 0
valueOpDeltaAdd <--- ERC slave code
Figure 1
BODY:1
vpvsp3pillion
deltaAddDelta 1.000000
}
}
The geomChan channel is an ERC-slave of a master channel in BODY. When you set the master, the geomChan loads and displays the alternate geometry, for example the pillion.
actor BODY:
{
{
valueParm vpvsp3pillion <--- ERC master
{
name Pillion
initValue 0
hidden 0
forceLimits 4
min 0
max 1
trackingScale 2
keys
{
static 0
k 0 0
}
interpStyleLocked 1
}
You find more information on alternateGeom and ERC in the ERC tutorial, Chapter 9.
(www.atlantis23.com/erc_download.html).