mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
pathshape cleanups and callbacks
sceneObject:
UpdateXformChange(mat); operates on the parent object, so made no sense to shove it in void SceneObject::PerformUpdatesForChildren(MatrixF mat){
provide callbacks for when the parent/child relationship changes
simpath+camerapline+pathshape
provide a mechanism to embed a callback for a pathshape defined on a path node. example:
new Marker() {
seqNum = "7";
hitCommand = "TheCommand" // <------------------------------;
position = "-17.0856 -92.2349 4.00051";
rotation = "0.0334943 -0.254411 0.966516 179.495";
};
function PathShapeData::TheCommand(%this,%obj)
{
echo("Do the thing");
}
This commit is contained in:
parent
f59c5f152f
commit
f4e6060b52
7 changed files with 42 additions and 21 deletions
|
|
@ -389,7 +389,7 @@ Marker::Marker()
|
|||
mNetFlags.clear(Ghostable);
|
||||
|
||||
mTypeMask |= MarkerObjectType;
|
||||
|
||||
mHitCommand = String::EmptyString;
|
||||
mSeqNum = 0;
|
||||
mMSToNext = 1000;
|
||||
mSmoothingType = SmoothingTypeSpline;
|
||||
|
|
@ -423,6 +423,7 @@ void Marker::initPersistFields()
|
|||
{
|
||||
addGroup( "Misc" );
|
||||
addField("seqNum", TypeS32, Offset(mSeqNum, Marker), "Marker position in sequence of markers on this path.\n");
|
||||
addField("hitCommand", TypeCommand, Offset(mHitCommand, Marker), "The command to execute when a path follower reaches this marker.");
|
||||
addField("type", TYPEID< KnotType >(), Offset(mKnotType, Marker), "Type of this marker/knot. A \"normal\" knot will have a smooth camera translation/rotation effect.\n\"Position Only\" will do the same for translations, leaving rotation un-touched.\nLastly, a \"Kink\" means the rotation will take effect immediately for an abrupt rotation change.\n");
|
||||
addField("msToNext", TypeS32, Offset(mMSToNext, Marker), "Milliseconds to next marker in sequence.\n");
|
||||
addField("smoothingType", TYPEID< SmoothingType >(), Offset(mSmoothingType, Marker), "Path smoothing at this marker/knot. \"Linear\" means no smoothing, while \"Spline\" means to smooth.\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue