Sign in to follow this  

How To Make Some Camera Movements

Recommended Posts

Spawn an entity (like a script_origin) which is your fake camera.


Then set the player(s) position to the position of the entity and link them to the entity.


Finally move and rotate the entity the way you like it.



Share this post

Link to post
Share on other sites

Here an untested but commented solution. Typed from phone so expect typos ;)


//add this if statement to the place where you start the camera from
//i guess that will be the endGame function inside the globallogic 
	//dvar to enable/disable the camera

//and put this into your new gsc for the camera Script
	//i use the spectator spawn as the start of the camera 
	//i dont know the exact name of the spawn so replace the xxx
	spectatorSpawn = getEnt(„xxxx“, „classname“);
	//create the camera entity and assign the position and rotation of the spectator spawn to it
	Level.endGameCamera = spawn(„script_origin“, (0,0,0));
	Level.endGameCamera.origin = spectatorSpawn.origin;
	Level.endGameCamera.angles = spectatorSpawn.angles;
	//loop through all players and move them to the camera
		Level.players[i] setOrigin(level.endGameCamera.origin);
		Level.players[i] setPlayerAngles(level.endGameCamera.angles);
		Level.players[i] linkTo(level.endGameCamera);
	//move and rotate the camera 
	//no idea what it is supposed to do… 
	//also no idea how often you want the actions to happen so i use a loop with a life time of 5 seconds… 
		//rotate camera (degree, seconds) 
		Level.endGameCamera rotatePitch(360, 1);
		Level.endGameCamera rotateYaw(360, 1);
		Level.endGameCamera rotateRoll(360, 1);
		//move camera 
		Level.endGameCamera moveX(50, 1);
		Level.endGameCamera moveY(50, 1);
		Level.endGameCamera moveZ(50, 1);
		Wait 1;
	//remove the camera
	Level.endGameCamera delete();



Edited by Viking

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this