Third Person Camera - Targeting Reticle
by Brian Wells · in Torque Game Engine · 03/02/2002 (2:52 pm) · 20 replies
I want to have a 3rd person targeting reticle for a game that is ONLY going to be in 3rd person perspective. Currently in 3rd person perspective the targeting reticle is not visible.
I want the targeting reticle to be above the players head a little bit, and the 3rd person camera default position to be a little bit above the default player models and looking forward (semi top shot if that makes sense)
I know that the player camera is probably within the model (as in tribes 2) but what about the targeting reticle? How can I get it to display in 3rd person mode? Also, are there any inherant problems to running the engine in JUST 3rd prson mode?
Thanks!
I want the targeting reticle to be above the players head a little bit, and the 3rd person camera default position to be a little bit above the default player models and looking forward (semi top shot if that makes sense)
I know that the player camera is probably within the model (as in tribes 2) but what about the targeting reticle? How can I get it to display in 3rd person mode? Also, are there any inherant problems to running the engine in JUST 3rd prson mode?
Thanks!
#2
:)
Any idea which file to mess with for the crosshair?
Thanks!
03/02/2002 (9:33 pm)
Trust me, you will love him...er...I mean her...lol:)
Any idea which file to mess with for the crosshair?
Thanks!
#3
06/11/2006 (1:44 pm)
Is the cross hair still accurate if you do it this way?
#4
06/11/2006 (2:15 pm)
No. As far as I know, the only ways to make an accurate third person crosshair are to make it a projected crosshair, or to make it a point in space your character always aims at. There are resources for projected crosshairs on the website, though the existing ones are a little bloated, I modifyed them to be a little cleaner for my uses. The problem with projected crosshairs is they can be a jittery and jarring, as they move to where your shots will literally hit. I'm curious how they make them work well in games like Max Payne, Hitman, etc.
#5
Try this, it works well for me.
06/11/2006 (4:25 pm)
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=3533Try this, it works well for me.
#6
" if (!control || !(control->getType() & ObjectMask) || !conn->isFirstPerson())
return;"
and comment this line out... and you're done.
11/07/2006 (3:25 pm)
In guiCrossHairHud.cc look for" if (!control || !(control->getType() & ObjectMask) || !conn->isFirstPerson())
return;"
and comment this line out... and you're done.
#7
11/07/2006 (10:54 pm)
@Andrew - except that its not an accuracte way to do it. Your aim will be off if you just use the first person crosshair in 3rd person
#8
11/08/2006 (4:22 am)
Only slightly, not enough to really notice(well for the FPS demo at least.)
#9
11/08/2006 (4:51 am)
Quote:Only slightly, not enough to really notice(well for the FPS demo at least.)Uh? i must be missing something. Its really hard to aim in third person view, and it can be off quit a bit.
#10
My game doesn't have shooting, so I don't care about aim. The cursor should basically just stay in the centre (or there-abouts) of the screen. Is this doable?
11/08/2006 (8:25 am)
Another question regarding this issue... say I have an adventure style game, and want to use the reticle in 3rd person view to simply interact with items on the screen. Can it be made to change to a custom icon (like a hand) when the character is close enough to an object to interact with it? Then once the cursor changes to a hand, clicking the mouse would do whatever action is appropriate for the object clicked on.My game doesn't have shooting, so I don't care about aim. The cursor should basically just stay in the centre (or there-abouts) of the screen. Is this doable?
#11
11/08/2006 (9:02 am)
Why would it not be? It's easy, too.
#12
11/08/2006 (12:49 pm)
Any tips on how to do it? I'm very new at this. Any help is appreciated!
#13
11/24/2006 (5:35 am)
Does anyone have any tips for me... just to point me in the right direction. You don't have to tell me exactly everything I need to do.
#14
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=9687
11/24/2006 (6:57 am)
I made a resource similar to what you're after, have a look ;)http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=9687
#15
11/24/2006 (7:03 am)
@Gareth - This looks like *exactly* what I'm looking for! Thanks! I'll try implementing it and let you know how it goes. I'm just barely starting out with Torque, so can I PM you if I have questions?
#16
11/24/2006 (7:05 am)
Sure ;)
#17
Does anyone have any ideas, as i would be interested to know how they did design it to work so fluidly.
My thoughts were that if the camera was inline with the eye node, then even in third person it would be non moving and completely accurate but looking through their head. Alpha'ing the model seems to fix this in wow etc. From there i though that if we did offset the camera in third person, and also offset the bullets to project from the camera not the eye, then the camera would be dead on but the bullets wouldn't be projected form the player's angle but from the camera's. That said, would it be that big a problem? it would be much less noticeable.
11/26/2006 (9:01 am)
In regards to pauls commentQuote:
I'm curious how they make them work well in games like Max Payne, Hitman, etc.
Does anyone have any ideas, as i would be interested to know how they did design it to work so fluidly.
My thoughts were that if the camera was inline with the eye node, then even in third person it would be non moving and completely accurate but looking through their head. Alpha'ing the model seems to fix this in wow etc. From there i though that if we did offset the camera in third person, and also offset the bullets to project from the camera not the eye, then the camera would be dead on but the bullets wouldn't be projected form the player's angle but from the camera's. That said, would it be that big a problem? it would be much less noticeable.
#18
In terms of other models I have a vague memory of a system where when a weapon is fired there is a raycast from the camera, then the model is aimed and fires at the point where that raycast hits something. That way the bullets come from the model, but are aimed at the point the crosshairs are over in teh world. I think the problem with this model was that it required regular raycasts to keep the character pointing in the same direction as the camera and if these were too frequent it used up too much processor time (esp in multiplayer) and if not frequent enough then character movement was jerky.
I can't remember where I heard this, it may have been a resource on GG, maybe somewhere else. It sounds like it has some promise though.
11/26/2006 (11:07 am)
Putting the camera in line with the eye node is how TGE does it at the moment I think. You'll notice that if you have the crosshairs visible in 3rd person they appear on the back of your character's head.In terms of other models I have a vague memory of a system where when a weapon is fired there is a raycast from the camera, then the model is aimed and fires at the point where that raycast hits something. That way the bullets come from the model, but are aimed at the point the crosshairs are over in teh world. I think the problem with this model was that it required regular raycasts to keep the character pointing in the same direction as the camera and if these were too frequent it used up too much processor time (esp in multiplayer) and if not frequent enough then character movement was jerky.
I can't remember where I heard this, it may have been a resource on GG, maybe somewhere else. It sounds like it has some promise though.
#19
Or do as David says - raycast from the camera and shoot at whatever the camera points at.
11/26/2006 (2:43 pm)
You cna also do hitbox instead of regular projectile collisions.Or do as David says - raycast from the camera and shoot at whatever the camera points at.
#20
Dan
12/15/2006 (8:15 pm)
@Davidovich -- I think that was part of the "Killer Kork" resource. There's also some info on raycasts in the Advanced Camera resource. Hope this helps :)Dan
Torque Owner Matt W
There is a bool check to see if you're 3rd or 1st person, and that will determine if you render the crosshair. Look around for it, and disable it so you can have it show up when you're in third person.
Only downsides with third person is you can't hide your player model (like was done in newer versions of Torque to increase performance a bit) and you better have a good looking model (preferably female) if you're going to make us look at it's ass all day hehe.