Vehicles as projectiles
by Bullitt Sesariza · in Torque Game Engine · 11/21/2007 (8:37 pm) · 3 replies
Hi, like the title suggested, can I make vehicles as projectiles? I mean I need a vehicle that start at some position and end at somewhere else and can collide with the player and respawn it again at the starting point, etc. In some way it has a projectile's property, but it needs the animation of a vehicle (the wheel, etc).
Thanks in advance.
Thanks in advance.
Torque 3D Owner Matthew Jessick
Starting the vehicle off with a particular velocity might be harder. You need to look through the vehicle and its base classes for script functions you can use. You could either write a setVelocity type consolemethod, or perhaps use the existing setImpulse
void Vehicle::setVelocity(const VectorF& vel) { mRigid.linMomentum = vel; setMaskBits(PositionMask); }(This works by overriding the empty shapebase baseclass method called by the ConsoleMethod( ShapeBase, setVelocity )