meatSim opened this issue on Jul 02, 2012 · 28 posts
lesbentley posted Mon, 02 July 2012 at 1:42 PM
Quote - I'm not entirely sure how to do some of it (geometry switching, and calibrating my monitor to be specific)
There are two parts to geometry switching, code to identify the geometries, and a channel to swap between the different geometries. Note that what follows is from a figure. I have not tested it in a prop.
Here is an example that will swap between 4 different geometries (including the default), you would place this code immediately above the 'channels' line in the actor you want to swap the geometry for:
alternateGeom geom_001
{
name geom_001
objFile 1001 :Runtime:Geometries:YourName:ProductFolder:object_001.obj
}
alternateGeom geom_002
{
name geom_002
objFile 1002 :Runtime:Geometries:YourName:ProductFolder:object_002.obj
}
alternateGeom geom_003
{
name geom_003
objFile 1003 :Runtime:Geometries:YourName:ProductFolder:object_003.obj
}
Then add this channel as the last channel in the channel stack:
geomChan AltGeom
{
uniqueInterp
name AltGeom
initValue 0
hidden 0
forceLimits 1
min 0
max 3
trackingScale 0.045
keys
{
static 0
k 0 0
}
interpStyleLocked 1
}
The name "AltGeom" is just an example, you can use any name. "The 'max' limit should be equal to the number of alternate geometries. When the dial is set at zero the default geometry will be used. To have a blank geometry (no geometry) you can either leave the geometry out of the base obj for that actor, or you can create an empty file named "blank.obj" and use that as one of the geometries to be swapped.
For adding parts to a helmet, it may be better to create an extra actor as a child of the helmet, and switch geometry for that part, rather than switching between different versions of the whole helmet.