Third Person Shooting

Hello guys,
can you help me, please.
In third person template I added to my player a gun,
now can`t to make following things:

  1. how to make an aim (how in the first person templ)
  2. also I cant make to shooting the gun, I cant make it shooting from the muzzle.
  1. you could do it the same as I show it in this thread: https://forums.unrealengine/showthread.php?55508-How-to-integrate-Military-Weapons-pack-into-FPS :slight_smile: (the post with the pictures)

The third person template is challenging for a shooter. There are many different ways to handle aiming in a third person shooter. There’s over-the shoulder, where you typically want them aiming at the same spot all the time, there’s various auto-targeting schemes used in games like Mass Effect, where your character aims at a specific target automatically. Combining free camera and free aim in a third person perspective is… well, I’m not sure how you’d do it well, honestly. There’s probably a way, but I can’t think of a game that does it.

By default, the third person template sets [FONT=Courier New]bOrientRotationToMovement to [FONT=Courier New]true, which means that the character is going to face the direction of movement at all times, but that is separate from the camera direction. This allows the character to move toward the camera, or to move laterally, unlike first person mode where you’re always looking where the character is looking. But, it also means that the [FONT=Courier New]yaw value from [FONT=Courier New]GetBaseAimRotation() will always be 0 when using the default third person setup, so you can’t drive left/right aiming off of it. You can still take the pitch value from [FONT=Courier New]GetBaseAimRotation() to feed your up/down anim offsets if you want the camera height to dictate where the character is aiming, but the left/right aiming generally has to come from somewhere else.

Maybe I should back up a second. Do you have have aim offsets for your character? If you want help with the aiming algorithm, you need to tell us what kind of aiming mechanism you plan to use. Unlike first person perspective, there isn’t really a single obvious approach, so we need to know more to help you.

Truly, at this point I have not more information, I would like to start from smth. simple, from simple aiming system. And then with time improving it.

I would suggest you to migrate Owen to your project. Find him in aim offset examples from content example project. Make him default pawn and try it out. He has nice setup already there. He will be aiming where the camera is looking and lower body will do its own thing. Then you can hack him and learn a few things.

Thanks for the answer, I have the thread, and watched the video you make.
But I have one problem, in video at 02:00 you choose for Sphere a projectile collision, but I have no projectile presets, everything except projectile. Maybe somewhere else I can choose it or what I must do?

Thanks for the answer, I have the thread, and watched the video you make.
But I have one problem, in video at 02:00 you choose for Sphere a projectile collision, but I have no projectile presets, everything except projectile. Maybe somewhere else I can choose it or what I must do?

Now I`m editing my project by your video, and now none of my events in weapon_BP not called. Why it not called in weapon_BP?

Either you use the fps template (there you already have this collision preset) or you just create one by yourself -> Project Settings - Collision - New Object Channel - Block :slight_smile:

What exactly do you mean? So when you fire an event nothing happens?

I`m using Third person template, and I watch some videos on YT - they also have no projectile preset, is it only in first person templ?

Yes, I have my character BP and weapon BP. When I start - no one events happened from weapon_BP, but when I early attaching my gun to socket from Level_BP it worked.

As I said, you can create one by yourself ^^ -> project Settings - Collision - New Object Channel - Block or just use the “block all” in the collision settings

So you place the weaponbp into the level - then you walk over it so that it gets attached - and when you then press “left mouse button” it doesnt do anything? ->when it is like that, connect a “print string” to the left mouse button in the weaponbp so that we know if there is really nothing going on.

Take a look at this project:

Thank`s a lot, you help me.