Auto-generating spectate cameras from in-game

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,697
2,581
Something that occurred to me just now. We have a server mod that can gather the player's current position and crosshair angle to produce annotations and save them on another server. There's also a command that commits the current position and angle of every physics prop in the map to the map's source file (or at least, it used to; it might have gotten broken since the file locations changed).

Would it be possible to make a client-side mod that lets you create spectate cameras in your map's source file by just loading up the compiled map, flying to some spot, aiming, and entering a command? Because that would be pretty cool. (Ideally you could just do it from Hammer, but that's not moddable.)
 

Geit

💜 I probably broke it 💜
aa
May 28, 2009
598
1,161
Would it be possible to make a client-side mod that lets you create spectate cameras in your map's source file by just loading up the compiled map, flying to some spot, aiming, and entering a command? Because that would be pretty cool. (Ideally you could just do it from Hammer, but that's not moddable.)


It's certainly possible - as you say Feedback already records position and eye direction (which is basically the defining points of a camera) - all that would be required is writing the results to a VMF using Sourcemod's KeyValue (VDF) functionality.

It'd be slightly involved - and sourcemod is more suited to servers rather than clients, but it is possible. Also, don't forget about the devshots console command.