Project updated (see change log)
Project updated (see change log)
Hey there, bit of a problem after converting to alsv4ās skeleton..
I added all the correct virtual bones, i added the fullbody animbp as a linked overlay layer in alsā animbp, replaced all references to point to the correct linked layer. then reparented the b_character_fullbody as a child of alsā anim man..
Now i get a problem where the gun does not go into ads, just holds the base idle pose. but when aim is activated, the right hand snaps to the head and aims backwards.
Ideas? or more information you can point towards changing the character?
The character in the 1st image you sent doesnāt seem to be in-game, it looks like heās in the viewport of the anim BP or the anim viewer. Only when he is in-game, and with the gun in his hands, the positions of the gun sights are calculated (CalcSightsTransforms) and sent to the anim BP. If I look at my character aiming in the anim BP viewport, I get a similar result to yours:
So donāt forget to bring CalcSightsTransforms to your gun BP (and call it when the gun is attached to your characterās hand) and test your character in-game. If youāre getting similar results in-game, there could be something missing in the CalcSightsTransforms implementation.
I havenāt tried yet to apply the Gun Sight Aligner to the ALS character (will probably try it when I have some time), but I believe it should be possible.
That screen shot is of the anim bp, but Ingame.
There is a preview feature for debugging, while the game running in editor, you can select from a drop down at the top, a list of active anim BPs being used in the world.. and itāll mimic what is playing in game.
So yeah it does the same in game..
Iāll look until the calc sights implimentation, thanks for the heads up on that.
I just reparented the class over the als one. So I assume itās in the the anim bp I missed.
CalcSightsTransforms is in the gun bp, it needs to be in your gun bp (or your gun bpās parent class) and be called after the gun is attached to the characterās hand. The Gun Sight Alignerās example character attaches the gun and calls its CalcSightsTransforms at EventBeginPlay. CalcSightsTransforms contains a ref to the hand bone - hand_r - and if your bone has a different name, you need to change the ref to match your own bone name, although I think the ALS characterās hand bone name is also hand_r.
Not sure whats wrong then, since Iām using the same example classes. I just parented the character under the als character, setup the anim bp and virtual bones, and the screenshot was the result..
and yeah bone names are pretty much the standard.
Check if:
-
ClacSightsTransforms is actually producing transforms: After attaching the gun to the hand, use a PrintString node to print the length and values of the SightTransforms array, which is filled by CalcSightsTranforms. Length of 0 means that CalcSightTransforms isnāt working (or the gun has no tags or aimpoint sockets). Note: the Aim event of the product already includes a check to prevent trying to aim when this array is 0, but your character is already aiming in your pic, which tells me your array length isnāt 0.
-
The anim BP is actually receiving and using some value of this array: Use PrintString nodes in the anim BP to check the RelativeToHandLocation and RelativeToHandRotation values. They must be the same as the values in the SightTransforms array.
thanks for the info, looks super useful. Iāll get back to you with any updates..
Thx again
Still happening., removing and re adding to project seemed to work with the default anim bp, even using the alsv4 skeleton/mesh. However I think due to a natural 2-3 degree offset in Alsv4ās system, the aim is off by about a few degrees when adsāing by default. This isnāt too much of an issue. Iām just adding a 2-3 degree offset on any optical sight. Or maybe Iāll just add a base offset at the end of the animbp..
The issue is when the animbp is replaced with alsv4ās animbp and everything is copy pasted over, including events, and references to the animbp are changed, the aim always just reverts to 0,0,0 on his head.
Even though calc sight transform is printing a decent offset in the anim bp, i attached the calc sight on aim as well just to make sure, however still the same results as posted above.
[Edit on the above]: Seems a macro didnt get copied over for the sight transform in animbp..
Thanks again for the help..
Another, quick (or possibly not) question while I move onto the next module of the project.
If I want to set the mesh as the root, instead of the scene, what would be the correct process of doing this with the least amount of unnecessary overhead?
Thanks again in advanced..
Would it be possible to add a tutorial on how to integrate everything properly in ALS? It would be super helpful, thank you
In your gun bp, in the āComponentsā panel (the one on the top left corner where you see your components hierarchy), just drag the mesh on top of the DefaultSceneRoot, and it will become the root automatically.
Now about your issue, itās been resolved if I understand correctly?
I need to try and integrate it with ALS on my end first, to see what issues might come up. When I have the time Iāll try it and, depending of how it goes, Iāll make a guideā¦
yes, it was a lot of work and to be honest I donāt remember what I did exactly. But I had to add an offset to the calcsights transform in the anim bp to account for the als offset..
Pistols are perfect however rifles that use optic aim are still not centered perfectly. I will keep tinkering
I got the ads portion working great, but when Iām not aiming the gun is pointed above my reticle. So when I shoot, it still goes to center screen even though my gun isnāt. How do I fix this?
Hey, Iāve just answered your question on the store page:
https://www.unrealengine.com/marketplace/en-US/product/f38de71c8ae445129aeca0db794514af/questions
Please let me know if you have more questions!
Hey @PeaceSells_ Firstly great project, well documented!
Iām trying to port over your animation blueprint code to my own as iāve got features already implemented, but iām going piece by piece not to mess anything up, itās all going well so far except iām having issues with, what i assume is ā*pitchperboneā *Iām finding that my controller pitch is either too fast and the arms arenāt in sync with the camera position, theyāre moving, but much slower than the camera.
Do you have any suggestion on how to debug this?
Thanks
EDIT
Seems to have resolved itself, i think it happened when copying over some of the transform bone nodes, i toggled some of the bones on and off and is working fine now.
Hello @insideitall ,
Well, Iām glad to see that the issue resolved itself!
Anyway, it sounded to me like the 1 frame lag you get when you retrieve a bone position from the event graph to use in the anim graph. But from your solution, it seems like it was a different issue after all.
Thank you for reaching out and please let me know if you have more questions!
Hey man, I got it working great for a True first person mode. Iām using the MoveIt plugin with a system similar to ALSā Overlay system to use traditional First Person animations layered on top and it works GREAT. One question, how do you adjust how close a gun is to the camera when aiming? I tried moving the OpticAimpoint around and it didnāt change that I could see. Itās the one piece eluding me.
@oddjob1138 Nice to hear itās working great! Regarding your question: in the gun blueprint thereās a customization variable called āDistanceFromCameraā, just play with that!