mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 14:44:36 +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
|
|
@ -37,6 +37,7 @@ public:
|
|||
Point3F mPosition;
|
||||
QuatF mRotation;
|
||||
F32 mSpeed; /// in meters per second
|
||||
String mHitCommand;
|
||||
enum Type {
|
||||
NORMAL,
|
||||
POSITION_ONLY,
|
||||
|
|
@ -56,7 +57,7 @@ public:
|
|||
|
||||
Knot();
|
||||
Knot(const Knot &k);
|
||||
Knot(const Point3F &p, const QuatF &r, F32 s, Knot::Type type = NORMAL, Knot::Path path = SPLINE);
|
||||
Knot(const Point3F &p, const QuatF &r, F32 s, Knot::Type type = NORMAL, Knot::Path path = SPLINE, String hitCommand = String::EmptyString);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue