Announcement

Collapse
No announcement yet.

Third Person aim center screen

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Third Person aim center screen

    Hi all,
    I'm trying to unlock the mystery that is getting a nice third person setup that has player always aiming center screen. What I'm going for is a GTA 5 setup, where the player always aims at shoots crosshair whether its 1 foot in front of him or a mile.
    The way I have been trying to approach this fails, but this is what im attempting to do:
    Trace from camera forward *10000.
    if i hit something, find the look at rotation between player location and impact, then set that rotation on my character.
    if fail to hit, same as above but use the *10000 as the look at target
    my character either looks 90 degrees towards center or spasms wildly.
    I'm looking to do this only in blueprint - any help is appreciated!

    i feel like im possibly missing some foundational approach to this, im just trying to get an over the shoulder, but always have player facing center screen/ always make gun when it fires face directly to the center screen.
    Last edited by Mixolydian; 07-04-2015, 08:51 PM.

    #2
    Sounds to me like you pretty much got it! What I could add is perhaps an invisible backboard that would pick up any traces that go into the sky. Then it will always trace center screen, at whatever your cursor is touching. For the backboard I just make a giant box around my map of invisible plates.
    And instead of setting your actor rotation, use the results for the spawn transform, for your projectile.
    Last edited by CptShip; 07-05-2015, 06:21 AM.

    Comment


      #3
      Best thing here would be showing us the exact Blueprint Setup and also debugging the traces you do.
      Open for contracted work | C++/BP (incl. Multiplayer) | Tutoring | VR

      My UE4 Blog/Page with Tutorials and more: Hit me for ALL the things!
      (Including 100+ Pages Multiplayer Network Compendium to get you started.)

      Comment


        #4
        Your tracing logic is right but it sounds like the execution of "set character rotation" is doing unexpected stuff.

        Comment


          #5
          Heres what my set rotation looks like in my character blueprint. I played with different make rot from axes, everything spasms my character out. I have a blendspace for aiming in my animblueprint,
          not sure if its causing or adding to the problem.
          Click image for larger version

Name:	SetRot1.jpg
Views:	1
Size:	526.5 KB
ID:	1081223
          Click image for larger version

Name:	SetRot2.jpg
Views:	1
Size:	500.5 KB
ID:	1081224

          Heres what firing does (this does not use the aim blendspace)
          http://www.filedropper.com/firing
          and aiming which really screws things up:
          http://www.filedropper.com/aiming
          Last edited by Mixolydian; 07-06-2015, 03:27 PM.

          Comment

          Working...
          X