Announcement

Collapse
No announcement yet.

Gun Sight Auto-Aligner

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

  • replied
    Originally posted by Aidan1974 View Post
    No need to name the main gun component "Mesh1P" anymore. Now it can be named whatever you want, just like the other components, but it needs to have a tag named "MainMesh". This facilitates switching the main mesh component from skeletal mesh to static mesh and vice versa, since you don't need to replace the reference in the code anymore.
    Yes, that's right... would you like some help?

    Leave a comment:


  • replied
    No need to name the main gun component "Mesh1P" anymore. Now it can be named whatever you want, just like the other components, but it needs to have a tag named "MainMesh". This facilitates switching the main mesh component from skeletal mesh to static mesh and vice versa, since you don't need to replace the reference in the code anymore.

    Leave a comment:


  • replied
    Originally posted by AngeIV View Post
    Tell me - is your M16 package be a better starting point to incorporate a full body multiplayer shooter or this package?
    No, in that aspect both packages are the same, they use the same auto-aligning method and use the same SK_Mannequin_Arms for 1st person view.


    Originally posted by AngeIV View Post
    "On the roadmap" - how far away would you estimate? Is it weeks? months? days? years (like waiting for landscape architect LOL)
    Keep in mind that I can't state right now that this feature will actually be incorporated. If I start working in this feature, it will be after I finish some of the work I'm doing right now, which will take some months. Then after I start, I estimate it would take weeks to get done. So I would say that, if this feature is going to be incorporated, it would be in a matter of months from now.

    EDIT: Btw, if you're using this or the other asset in your project and need some help implementing your stuff, even if it's a full body implementation, I may be able to help you also in the Discord channel... If you want to join, send me an email and I'll send you the link.
    Last edited by PeaceSells_; 10-04-2019, 10:02 AM.

    Leave a comment:


  • replied
    Yeah I've been playing with some FPS added to different anim system out there, but ended up with making my own due to multiplayer specific requirements. The results are not bad, however as most of my aiming require proper animation setup, and the gun has actual functional barrel and the GUN is shooting the projectiles - the aim is never EVER perfectly at the center of the screen. it is where the muzzle aims, or roughly where the scope aims (due to scope proper mounting at proper angle, but still what I love about Your system is that you setup the exact crosshair center point. Tell me - is your M16 package be a better starting point to incorporate a full body multiplayer shooter or this package?
    "On the roadmap" - how far away would you estimate? Is it weeks? months? days? years (like waiting for landscape architect LOL)

    Edit: Also thank You for the long explanation and answer. Most appreciated!

    Leave a comment:


  • replied
    AngeIV - I've been testing the change to the full body mesh and making the necessary adjustments and, while the alignment itself works, there are other very important aspects about using a full body mesh in a 1st person perspective that must be carefully adjusted, in order for the end result to look good from outside. Making a solution for this requires significant changes and additions to this project, which I actually would like to implement, but right now I can't spend the necessary time with this specifically. This might be incorporated in this asset in the future though, since I also find it much cooler to use a full body mesh then an arms mesh. I understand you and I think this is a valid request from you and not a matter of being "a lot to ask", it's more a matter of incorporating a feature that is already on the list of future possible (due to time constraints) additions for this asset.

    Btw, if you're trying this on your own, the first thing you have to do if you make the camera a child of the body mesh, instead of the the mesh being the child of the camera (which is default for traditional FP shooters and how it's currently set), is to change how you access the camera in the anim blueprint. Currently it creates a reference for the character's camera in the BeginPlay event and, from that point on, it accesses it through this reference. That reference seems to not work well when the camera is a child of the mesh, so you will need to access the camera through a character reference directly instead.
    Last edited by PeaceSells_; 10-03-2019, 10:50 AM.

    Leave a comment:


  • replied
    I'm looking into it, should have an answer soon.

    Leave a comment:


  • replied
    Hi,
    Im using a full body mesh with aim offset and ironbelly studio weapon packs.
    aligning the weapon for projectiles fire with the camera and crosshair is a pain. every weapon aims at a different height and has different sights on different heights.
    Could you showoff a use of this ik system for a full body?
    I know it might be a lot to ask of - but I would very much appreciate it. PeaceSells_

    Leave a comment:


  • replied
    Update v1.1.0

    Change log:

    - Tweaked the auto-aligning method. It now uses less nodes and adding your own movements/sway to the gun became easier, since now you control the location/rotation of the sight's aimpoint directly by controlling a bone (sight's location/rotation is the same of the bone).

    - Aiming is no longer a separete state in the state machine. In order to allow for variable aiming down sights speed, aiming is now implemented through BlendPosesByBool nodes inside other states.

    - Added customization variables for aiming down sights speed and cycle between sights speed.

    - Added customization variables for amplitude and play rate of the procedural animation for firing while aiming down sights.

    - Reorganization of folder structure.

    - Updated to UE4 4.23.

    - Youtube video tutorial updated to reflect the new folder structure. Instructions are the same, since the procedure for swapping the example gun and anims for your own gun and anims is exactly the same.

    Leave a comment:


  • replied
    So UE 4.21 doesn't accept migration of assets from the UE 4.22. And attempting to simply copy/paste code results in engine crash, probably because code makes reference to assets - blueprints are assets too and some blueprints need to reference others. And also: blueprints reference animations, animation blueprint references blueprint, etc. Apparently, releasing a working version of the project for an older version of the engine would require re-importing sources (meshes, textures, materials, animations), re-setting them up with each other and re-assembling the blueprints. At the moment I can't do this... I'm working on project improvement currently... So I'm sorry for this...

    Leave a comment:


  • replied
    So I tried the engine version switch feature - right click on the .uproject file and select "Switch Unreal Engine version", but the resulting project seems to have all the assets locked in the editor. I will try starting a project in 4.21 and migrating the assets and maybe copy-pasting the code, but I will need a bit more time for that. I'll get back to you as soon as I have an answer.

    Leave a comment:


  • replied
    Originally posted by t.mat View Post
    hello, are you planing on bringing this out for version 21? or is there any chance i can download the 22 version and implement all the code to my 21 project?
    Hey man, it looks like I missed your post, I'm really sorry for that... I can swear I didn't receive any notification. Anyway, I'll check this and get back to you with the answer in a moment.

    Leave a comment:


  • replied
    hello, are you planing on bringing this out for version 21? or is there any chance i can download the 22 version and implement all the code to my 21 project?

    Leave a comment:


  • replied
    Update v1.0.1:

    Change log:

    - No need to name the main gun component "Mesh1P" anymore. Now it can be named whatever you want, just like the other components, but it needs to have a tag named "MainMesh". This facilitates switching the main mesh component from skeletal mesh to static mesh and vice versa, since you don't need to replace the reference in the code anymore.

    - Example meshes were now re-imported into Unreal facing +X axis instead of +Y axis. It makes no difference for the auto-aligner, but it's now oriented as advised by Marketplace guidelines.

    - Calculation of gun sights locations and rotations now use less nodes in the blueprint.

    - Youtube tutorial video updated.

    Leave a comment:


  • started a topic [SUPPORT] Gun Sight Auto-Aligner

    Gun Sight Auto-Aligner

    Hello guys!

    I've just released the Gun Sight Auto-Aligner blueprint asset on the Marketplace! Feel free to post questions, etc!

    Playable demo


    Change logs:

    v1.0.1 change log
    v1.1.0 chnage log


    Gun Sight Auto-Aligner in the Marketplace

    Latest Demo/Tutorial video:



    For old videos, go to the playlist of all videos: https://www.youtube.com/watch?v=n3fT...yeot8V&index=2


    Click image for larger version  Name:	Thumbnail2.jpg Views:	1 Size:	39.0 KB ID:	1637779



    Click image for larger version  Name:	Desktop-Screenshot-2019.06.18--17.53.38.24.jpg Views:	1 Size:	197.6 KB ID:	1637780



    Description:

    These three blueprints will get your gun mesh, your misaligned FP aim down sights pose (or even your FP idle anim) and will procedurally generate an aligned aiming pose out of those, for as many gun sights you want to have on your gun.

    For those who don't have time to align their gun sights by hand for FP aiming down sights poses, these three simple blueprints (gun, character and anim blueprint) together will procedurally animate the FP arms when you press aim down sights, aligning your gun sights to your FP camera, while keeping both hands perfectly on their spots on the gun by utilizing IKs for the arms. No aiming animation required, it can transform a simple first person idle animation that you have for your gun in an aiming pose with your sights aligned to the camera. It supports multiple sights simultaneously on the gun and will cycle through them by pressing a button.

    Made for the Epic's first person arms skeleton (SK_Mannequin_Arms) with any attachment socket on the HAND_R bone. It makes no difference the name and position of the socket, as long as it's attached to the HAND_R bone.

    Comes with a working example ready with:

    -Aim down sights button, zoom button, cycle between different sights button and a button for alternating between two debugging external cameras for checking hands/arms position and animation.

    -Example gun mesh, example gun sight meshes (optics and iron sights, skeletal and static meshes).

    -Example idle anim sequence and example walk anim sequence, with fingers position that cosmetically fit the example gun (after replacing the example gun with your own gun, for cosmetic reasons you would replace these anim sequences with ones that have fingers fitting your gun better, or adjust them inside Unreal)

    -Procedurally generated aim down sights firing anim.

    Check the video link above for demo and detailed instructions!

    Technical details:

    Briefly, the auto-aligner is composed of three parts:
    • A gun blueprint in which every gun sight component (StaticMesh or SkeletalMesh), must have both a tag and a manually placed socket that will mark the aimpoint of that gunsight. If the main gun component also has a sight as a part of its mesh, it must also have tag and socket
    • A character blueprint which uses the Epic's FP Skeleton (SK_Mannequin_Arms) and will spawn the gun, attach it to a socket at his HAND_R bone and then find the relative position between this bone and each present gunsight, then communicate the position to its Anim Blueprint
    • An Anim Blueprint for the SK_Mannequin_Arms that, when the character aims down sights, procedurally places his HAND_R bone in the exact place so that the current gun sight is always aligned to the first person camera

    Number of Blueprints: 3

    Input: Pre-configured for Keyboard and Mouse

    Network Replicated: No

    Supported Development Platforms: Tested on Windows 10 64-bit desktop

    Supported Target Build Platforms: Tested on Windows 10 64-bit desktop

    Documentation: Video link above has detailed instructions. Blueprint code is all commented

    Important/Additional Notes:
    • Naturally, camera must be within reach of the arms for the alignment to work...
    • Gun must be attached to any socket belonging to the HAND_R bone on the Epic's SK_Mannequin_Arms
    • Not tested for Third Person games
    Last edited by PeaceSells_; 11-02-2019, 04:45 PM.
Working...
X