Reticule Aiming, how?

I don’t mean making a reticule to show where you are aiming at. I mean the older(?) style of aiming in RPG games. Examples I can think off the top of my head are Mass Effect (1) and Vampire the Masquerade Bloodlines. Possibly, the Jedi Knight series as well, but I haven’t played that game for a while, so I can’t say with certainty.

At first, I was thinking of casting a ray, and at the location the ray hits, draw a circle there, and pick a point from a disk there. However, I was thinking that if that is used, the circle can be blocked or be harder to see due to distance, without maybe some camera manipulation. And I figured, since this is a technique, that’s been used quit a lot in the older days, it shouldn’t be too hard to find, but either I’m searching with the wrong keywords, it’s obscured in other tutorials, or it’s not out there.

Anyone got an idea of where to start or the actual code to do this? What I’m looking for is basically a GUI that represents an area to get a random angle from. So I can use that angle to fire a poorly aimed shot, depending on the angle.

So I understand this as you want an aiming reticule that is not centered to the screen but also not inside the physical world?

If so, you can cast a ray out as you said before, and then use Unity - Scripting API: Camera.WorldToScreenPoint
to transform the position it hits into screen space and draw it on your HUD as a normal texture.

You can limit the length of the ray or even better scale the reticule texture up if is too small on the screen. You will also want to make sure if you do it this way that you offset the texture by half its width and height so it’s center will be the center of the raycast.

Not sure what you mean by not centered to the screen, but yes, not in the physical world.

This picture might help me explain what I’m looking for.
1280411--57665--$R_ex_1.png
(Picture is randly stolen from the internet)

As you can see, there is a purple reticle in the center of the screen. The circle has roughly 9 kids in it, excluding the heads of one or 3. If the picture is 3d, and the kids move up closer, the reticule would encompass less of them.

****Ugh, I’m bad at explaining this aren’t I?

So what is the purpose of the reticule?

Does any kid/object in it, get hit by gun fire? Is it, just to see the rough area where you are aiming?

I am thinking you want to cast a ray, and place this reticule either at the end of the ray or in the middle somewhere. Maybe also, put the reticule on a different camera layer. Just some thoughts.
:?

What you said would occur if you did nothing except have a circle as your reticule though. If an object moves closer to the camera it would block the view of other objects :confused:

Can you think of a game where this effect is in so we can see what you mean? Post a video or something from youtube?

I mean to choose a point in the reticule’s area.
Much like the RPG shooters back in the day. They give you a reticule, and when you shoot, it shoots to one of the random points in the reticule. (Or atleast this is what I assume.)

This vid of VTM should show it better, maybe.

Notice how the reticule expands after being shot. It makes it less accurate, because it has a bigger area to choose from, which means more points to choose from.

I was thinking of doing another camera layer as well, but was wondering if there was another method to do so. I wouldn’t think that that’s how they did it in the old days, and that seems to work pretty well.

That’s a reticle that’s physically in the world. You do a raycast (or a spherecast might be better for a reticle with an arbitrary radius), and put a quad that’s facing back towards the character at the distance where it hits.

The ray can be cast forwards from the camera, or forwards from the character (in that video you posted, it moves all over the place based on the angle of things)

Increasing or shrinking the size of the reticle can be directly linked to how much randomness you’re going to apply to the shot, or other arbitrary information (depending on the style of game, maybe it indicates chance to crit or miss or whatever) the important thing is once your accuracy system is working under the hood, hooking it up to your 3D in game reticle should be straight forwards.

In that video you posted, it’s completely in world, in that it even gets occluded by the monster sometimes. If you don’t want that behaviour, you can tweak the reticles shader so that it always renders on top. This is easier than using a second camera.

ps. taking a random photo of kids and drawing a circle over one of them was slightly creepy and not at all informative :slight_smile:

Ah, I didn’t think it was in the world. Didn’t seem like it. I guess I’ll just go with that I suppose. Thought there might’ve been a better way to do it.