Alternative to ply:Spectate(OBS_MODE_CHASE) that does not remove the player.
5 replies, posted
Hey, I was looking into a custom function that could replace ply:Spectate(OBS_MODE_CHASE) with making it let the Player stay where he is (Not dissapear) and when he quits the spectating he will just get back into where he was. Is this possible? Also this is Third Person because of (OBS_MODE_CHASE). Any help is appreciated! :smile:
You could fake it - like store the player's location in a variable, spawn an entity/npc there and remove it when they stop spectating then put the player back in the spot
Any hint on how to achieve that?
[QUOTE=Datamats;49140961]Any hint on how to achieve that?[/QUOTE]
I would say CalcView hook while freezing the player, you can set the camera target angle and pos with it where to look at, so just follow whatever you want with that.
Serverside: SetupMove + AddOriginToPVS
Clientside: CalcView
Using the Freeze will prevent camera movement. Instead get the speed and direction from SetupMove and override its CMoveData.
Thanks. Was able to achive what I wanted :happy:
Sorry, you need to Log In to post a reply to this thread.