Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → COG camera position
COG camera position
2006-04-09, 5:31 AM #1
I need 1-st person camera be liitle higher
Can someone write simple cog code for this?
Or there is another, simpler way ?

please help

Ortheza
-= Jedi Knight I forever =-
2006-04-09, 12:26 PM #2
ParseArg(player, "eyeoffset=(0.0/0.0/0.037)");

Change the 0.037 to whatever distance z you want the camera to be from the player's position handle. (0.037 is the default -- 0.037 JKU above kyle's "center of mass")
May the mass times acceleration be with you.
2006-04-10, 6:04 AM #3
Thanx man :-) I'm going to test this.
-= Jedi Knight I forever =-
2006-04-10, 10:54 AM #4
oK, now another question.
how to bring 3rd person camera to the center of the player's head.

please help again :)


greetz
Ortheza
-= Jedi Knight I forever =-
2006-04-10, 4:14 PM #5
The third person camera is tricky, because it rotates about the eye offset in some set fashion (or something like that -- see goldeneye mod for example and switch to external view when you've zoomed in with one of the rifles).

One thing you could do is fire a dummy camera for external...
Code:
pulse:
if(getCurrentCamera() == 1)
{
	toggle = 1 - toggle;
	if(toggle == 0)      //external
	{
		vec = VectorSet(0, 0, 0.4);                    //where to fire the camera template, relative to player and his lookvector
		cam = FireProjectile(player, cam_tpl, -1, -1, vec, '0 0 0', 0, 0, 0, 0);
		SetCameraFocus(0, cam);
	}
	else                 //internal
	{
		ParseArg(player, "eyeoffset=(0.0/0.0/0.04)");  //slightly higher; e.g. - for a tall person
	}
	CycleCamera();
}
return;


Something like that ought to work.
May the mass times acceleration be with you.

↑ Up to the top!