Moving props along a track

I’m making a movie and I wanted to make some vehicles move around. I don’t have any people to drive them, and I want multiple moving at once so I can’t do it myself, but I would still like to have them move.

Is there some tool out there that I can use to make props move along a path? Preferably able to be triggered with a hotkey.

Can’t help with a specific tool but you can easily use _ent:SetPos( _pos ); where _pos is the current object position, plus the object:GetAngles( ):Forward/Right/Up( ); normalized vector * units per second to travel * FrameTime( ); which will give you smooth movement.

IE, to move a camera forward at 200 units per second would be in CalcView:


local _p = LocalPlayer( );
if ( !IsValid( _p ) ) then return; end

local _pos = _p:GetPos( );
local _ang = _p:GetAngles( );

local _f = _ang:Forward( ); -- this is a normalized Vector, ie length = 1 unit which describes a direction


local _newPos = _pos + ( _f * 200 * FrameTime( ) );

// Since I'm using the player object as the object we're moving; but clientside this won't work, serverside it would but not in CalcView.. CalcView is to move the camera so you'd need to keep track of cam pos to replace _p:GetPos( ); and cam angle to replace _p:GetAngles( ) then everything else is the same
_p:SetPos( _newPos );



Hopefully this provides some insight.

There are some tools to “animate” models using Lua, but to move things around, you’d probably need to write it yourself or hope someone else is working on it

Oh, shame. I have no idea how to use LUA, so I hope you don’t mind another question or two.

Where exactly do I put that? I asume I make a .lua file somewhere, but I have no idea how I’d use that.

Honestly if I have to script those tools, I might have to just suck it up and use SFM, though I’m reluctant to do so.