Game Development Community

Third Person Reticule

by Cody Mc · in Torque Game Engine · 08/09/2004 (9:51 pm) · 12 replies

Howdy,

Is there a resource for a third person reticule? EG - I need the player to be able to be in third person and aim a reticule so he knows where he's firing. Currently in Torque, you shoot based on your camera direction in third person.If you're looking down - you shoot at the ground.

The primary concern though, is accuracy. Our game has a lot going on, a pretty chaotic run and gun, and if we're going to use third person (which we want to do for this game) - then we need to be able to aim with accuracy.

Cody

#1
08/09/2004 (11:49 pm)
I think this should help you. It's 3rd/1st.

You can find the resource HERE....
#2
08/09/2004 (11:57 pm)
There are 2 3rd person crosshair resources (one is a mod of the other). Just yesterday I was trying to implement them, but my engine freezes up after 5-6 seconds when I add them. Search for crosshair in the resources.

If you have success, then please post it here too. I'll try to code my own - possibly release as a resource if it works.
#3
08/10/2004 (12:30 am)
I coded one which is based on a series of nodes and it works very well. Let me see if I can give you the concept of it. It actually is quite involved as my system also controls the camera.

Main Node @ player position

Camera Destination Node @ a position behind the player, the camera slowly tries to get to this position, in other words it lags slightly behind the quicker movements of the player

Far Aim Node @ a position far away from the player out in front

Pre - Smoothed Target Node @ an interpolated position between the main node and the Far Aim Node I use a LinePick or what you might call a RayTrace toward the Far Aim Node, whatever polygon the Ray hits the Target Node gets positioned there.

Smoothed Target Node @ an interpolated position between last position of Pre - Smoothed Target Node and new position. This is where projectiles actually fire. This node moves nice and smooth for accurate aiming.

The whole setup works rather like a see saw as well. If the player looks up the camera destination node and the camera node itself rotate toward the ground as the target node goes up in the air. Everything is ultimately a child of the main node.

Not sure that really helps you out, but the basic premise is there.
#4
08/10/2004 (1:02 am)
Its somewhat similar to what the existing reticles do, and what I'm about to do.

Grab the player object's weapon muzzle, cast a ray that is X units long. If it hits anything then place a billboard shape in the world at that position (3d reticle is what I want - not a GUI reticle)

If it doesnt hit anything, place the reticle at the end point of the raycast.

*should* work if you can live with a reticle that gets smaller and smaller with distance.

If not, then have a "world to screen position" and draw a reticle there.

Quite simple
#5
08/10/2004 (9:08 am)
Thanks for the quick replies on this. I really appreciate it. I will be sure to post if we get something that works reliably.
#6
08/10/2004 (10:03 am)
I got mine working in 3rd person with a crosshair object in the world. There are a few problems (I need to scope the object so that no one else can see it as an example), but it works like a charm.

Watch for screenshots and/or even a resource soon.
#7
08/10/2004 (11:34 am)
Yeah, I draw 2D at the projected position. Using this method though it's important to use an interpolated node. Otherwise your reticule jumps from poly to poly a little ... well mine did.
#8
10/25/2004 (10:49 am)
Any chance you finished this resource Thomas? :) The two resources I found for 3d crosshairs freeze up my 1.2 and 1.3 builds. It seems like it only happens when you look up over the terrain. Anybody found a solution to this??
Thanks
#9
10/25/2004 (11:32 am)
I like this resource for targeting. The laser sight gives you a visual marker for your starting and ending points. Or else you could use it and implement targeting like in Biohazard/Resident Evil 4 (though you'd have to move the camera a couple of feet to the right of the character, which makes aiming a bit difficult to get used to at first).
#10
10/25/2004 (11:43 am)
Yeah - I finished up my crosshair. It works great and is fully client side. Its not for every type of game.

The resource I derived from it is here: www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=6504

Its not 100% directly usable - you would need to hack up a GUI component, but thats left as an exercise to the reader. My usage of it is quite special for my game, so I didnt want to post that directly.
#11
10/25/2004 (11:49 am)
That's a great resource, Thomas! I don't think I'd ever noticed it. I miss all the good stuff.
#12
10/25/2004 (3:27 pm)
Great! Thank you very much - going to take a look at it now :)