I remember in Jedi Knight (built from the Quake 2 engine) that you could change your camera angle to 3rd person by pressing F1.
In 3rd person view, your camera looked wherever the character looks. You can see your characters model and the weapon he is using is attached approporiately.
However!
In 1st person view. you do not see your character model. My question is, in 1st person view, is the gun you are seeing the gun that is attached to your character's model, or is it a different model only displayed in 1st person camera?
I seem to recall 3rd and 1st person weapon models being different from modding the game.
Any ideas?
Also, with 3rd person cameras, it looks like the camera looks through your characters head. How to describes this... when you aim your cursor, the camera is always facing where your aiming, but always THROUGH your characters head. Anyone able to easily accomplish this?
3rd and 1st Person Cameras
the last one:
hope this pusedo code makes sense. If not post back and tell me.
Code: Select all
Set cam target to head centre;
find crosshair target;
normalize crosshair target;
negative crosshair target; //'-crosshair target' or 'crosshair target - (crosshair target * 2)'
multiply by dist from head;
this is cam position;
pushpork
My code for positioning a 3rd person camera is as follows.
cpos = camera position
pos = avatar position
rot = avatar rotation
crot = camera rotation
R_PI = 0.0174532925
cameraradius = camera's distance from player.
cpos.X = pos.X + cos(rot.Y*R_PI) * -cameraradius;
cpos.Y = pos.Y - sin(crot.X*R_PI) * cameraradius;
cpos.Z = pos.Z + sin(rot.Y*R_PI) * cameraradius;
And then you set up a mouselook that changes the angle of the player model on the Y and the angel of the camera on the X axis.
As for a transparent head, I'd just make the head a separate model and change its alpha value when needed.
And yes, the 1st and 3rd person models are different. There is no character model in 1st person and the weapon is also usually more detailed in 1st.
cpos = camera position
pos = avatar position
rot = avatar rotation
crot = camera rotation
R_PI = 0.0174532925
cameraradius = camera's distance from player.
cpos.X = pos.X + cos(rot.Y*R_PI) * -cameraradius;
cpos.Y = pos.Y - sin(crot.X*R_PI) * cameraradius;
cpos.Z = pos.Z + sin(rot.Y*R_PI) * cameraradius;
And then you set up a mouselook that changes the angle of the player model on the Y and the angel of the camera on the X axis.
As for a transparent head, I'd just make the head a separate model and change its alpha value when needed.
And yes, the 1st and 3rd person models are different. There is no character model in 1st person and the weapon is also usually more detailed in 1st.
Thanks for that!Dances wrote:My code for positioning a 3rd person camera is as follows.
cpos = camera position
pos = avatar position
rot = avatar rotation
crot = camera rotation
R_PI = 0.0174532925
cameraradius = camera's distance from player.
cpos.X = pos.X + cos(rot.Y*R_PI) * -cameraradius;
cpos.Y = pos.Y - sin(crot.X*R_PI) * cameraradius;
cpos.Z = pos.Z + sin(rot.Y*R_PI) * cameraradius;
And then you set up a mouselook that changes the angle of the player model on the Y and the angel of the camera on the X axis.
As for a transparent head, I'd just make the head a separate model and change its alpha value when needed.
And yes, the 1st and 3rd person models are different. There is no character model in 1st person and the weapon is also usually more detailed in 1st.
I've been trying to figure it out for a while.....
Of all the things i've lost, i miss my mind the most...
-
- Posts: 23
- Joined: Thu Aug 09, 2007 5:16 pm
help....doubt...
does that mean that i dont need a player model when im usig first person view....
and please bear with me....
how do i get a call of duty or quake or serious sam like look in my game using irrlicht cameras...where i actually cannot see the player but can see the weapon in his hand(as if the player in game is actually me...and everything i see is from my actual view point.)
is that accomplished by merging the FPS camera and just a weapon model or will i have to design a whole player model and place camera at some point inside the model appropriately.
and please give me a code as how to merge the model and camera...(that is ...to get the effect i mentioned above,where the camera moves along with the model or the other way....the model moves wherever the camera moves)
[TO PUT IN SIMPLE WORDS...I WOULD LIKE TO SEE A GUN TIP IN MY FPS CAMERA...MOVING ALONG WITH THE CAMERA]
and please bear with me....
how do i get a call of duty or quake or serious sam like look in my game using irrlicht cameras...where i actually cannot see the player but can see the weapon in his hand(as if the player in game is actually me...and everything i see is from my actual view point.)
is that accomplished by merging the FPS camera and just a weapon model or will i have to design a whole player model and place camera at some point inside the model appropriately.
and please give me a code as how to merge the model and camera...(that is ...to get the effect i mentioned above,where the camera moves along with the model or the other way....the model moves wherever the camera moves)
[TO PUT IN SIMPLE WORDS...I WOULD LIKE TO SEE A GUN TIP IN MY FPS CAMERA...MOVING ALONG WITH THE CAMERA]
a simple rule for performance: don't model anything you can't see !!!
so in 1st person you don't need a complete character, just what you see, weapon and maybe hands...
so in 1st person you don't need a complete character, just what you see, weapon and maybe hands...
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java