I do not know how the proper set up for this weapon

Ramarolo

Member
Hi all mates devs,
I do not know how to set up a weapon that is different than the weapons of the UCC assets and examples. It is a permanent canyon in the character hand: think about the weapon of Samus in any Metroid, the canyon is always there, never hide, and only changes the shape (animate) when you select "another" weapon.
Screenshot of the character:
Custos_Shooting_Holding_Hand2.png
. I set up the character through Character Manager and it is perfectly working in Runtime.
. In ItemTypes Manager, I created a collection named VincoCollection (the same as the character), and inside this collection, I added the object Canyon. I used Animator ID 500 for the canyon.
. In Object Manager, I created a sphere as ammo just to test the shoot.

I want that when I press Aim, my personal shooting animation be loaded (like in the photo), and obviously when I press to fire the object (sphere) be shot.
I am not sure how to link the shooting animation I created with the Demo animation controller of the asset, as I want to use the Demo animation controller for the character in the final game.
Summarizing, I want a permanently visible weapon that has different animations (one for each weapon) and each one with its own ammo.

I know that it is a little bit different than the asset examples, but I hope someone can help as I can not forward my project without this,

Thanks.
 
Last edited:
It would be easier to just have multiple different items set up with the different models/animations, and just make it so the weapon doesn't go off the screen when swapping (e.g. with the first person perspective item's position/rotation spring exit offsets). Then you could easily configure each weapon as needed.
 
It would be easier to just have multiple different items set up with the different models/animations, and just make it so the weapon doesn't go off the screen when swapping (e.g. with the first person perspective item's position/rotation spring exit offsets). Then you could easily configure each weapon as needed.
Thanks. You´re right, it was a possibility that I previously considered, for switching weapon the canyon animates getting into the arm, and another model arises occupying the place of the previous weapon, the result would something like this:
WeaponsCustos.jpg
Until here the theory very good, but, how? Screenshots of how I created the Collection and Item (I do not know if I did it correctly, and I know I avoided hiding arms in first person view) ItemTypesCanyonCustos.png
ItemManagerCanyon.png

I want to change the default Animation of Aim by my Animation Aiming with the canyon. I added my custom aiming animation to the Controller, but I do not know how to say UCC that uses my animation instead of the default Aim animation. The only video on youtube channel about scripting new abilities is related to animation (crawling) when entering in a trigger, but I do not see in the documentation how to replace the Demo animations by my custom ones.
How do I replace the Aim animation?
 
As I can not attach more than 3 photos in a comment I show that I added my animation to the controller:
1611765610491.png
But as I said I do not know how to connect it to the Aim button, as when I press Aim the controller changes to this:
1611765729580.png
 
You'll need to make sure all your animator transitions' parameters are set up correctly. In this case, the Aim ability sets the Slot[0/1]ItemSubstateIndex parameter to 1 when active. (This can be seen in Aim.GetItemStateIndex.) So you'd need to make sure that your animator transition to your custom Aim animation includes this parameter.

It may be worth noting that the "Aim" animator states on Nolan may not refer to exactly what you're thinking of, for example the Aim Idle state in Nolan's base layer is active while standing still, even when not using the "Aim" ability (zooming).
 

Attachments

  • 1611833604219.png
    1611833604219.png
    15.4 KB · Views: 3
You'll need to make sure all your animator transitions' parameters are set up correctly. In this case, the Aim ability sets the Slot[0/1]ItemSubstateIndex parameter to 1 when active. (This can be seen in Aim.GetItemStateIndex.) So you'd need to make sure that your animator transition to your custom Aim animation includes this parameter.

It may be worth noting that the "Aim" animator states on Nolan may not refer to exactly what you're thinking of, for example the Aim Idle state in Nolan's base layer is active while standing still, even when not using the "Aim" ability (zooming).
Hi, sorry for the late reply, but I was watching again all existing videos and courses of Unity Learn of Animation, reading Unity official docs related to animation, reading the docs of UCC, and watching again the UCC videos before asking again. A lot of days of work and I terribly failed in customizing the asset. Before surrendering at all, I am gonna try asking again:
How can I customize animations clips of the asset?:
According to https://opsive.com/support/document...ller/animation/animator/replacing-animations/ you just have to substitute the clips of the asset by your own. But, as you can see in next photo, I replaced Aim clip by my own in the Blend Tree, Aim is true in Runtime but it does not work:
1612946570332.png
The Animator Controller is the Demo, the default one of the asset, so I did not touch transitions or nothing, just replaced the clips (see photo in Runtime with the picture of my Aim Animation in Preview, the Blend Tree running but the animation is the default Idle, despite Aiming is true). I also tried in the Demo Scene with Nolan, the same process as I described previously, but he does not Aim with my Animation. The only thing different in here is the SlotItemID 100 corresponding to the weapon I created, but I tried also without my weapon and nothing works.

How can I really replace Animations of the asset by my custom ones?

Thanks.
 
The animation clip itself might not have been created properly for a humanoid/generic avatar. You can check this by opening the animation clip itself in Unity and checking if all of its transform references to the bones are intact (if it's unable to find a bone it changes the colour of the transform name, to yellow I believe).
 
The animation clip itself might not have been created properly for a humanoid/generic avatar. You can check this by opening the animation clip itself in Unity and checking if all of its transform references to the bones are intact (if it's unable to find a bone it changes the colour of the transform name, to yellow I believe).
I know how to properly set up an avatar, but it is not the case, as I told you I tested also de Demo Scene of the asset with Nolan and his controller, and despite the Aim is active and Nolan is in Preview window my Aim Custom animation, it is never played in the game. Photo:
I can not use the asset if it is not customizable.
 

Attachments

  • NolanNotUsingAnimation.png
    NolanNotUsingAnimation.png
    231.2 KB · Views: 3
Are you in a first or third person perspective? If you're in first and want to use the humanoid animations you'll need a tool such as FPS Mesh Tool. This page has more info:


There is a lot to the demo animator controller so I highly recommend that you create your own controller. This will allow you to play the exact animations and states that you want to play. This page has more info:


As a quick test you should be able to use the existing animator though. It looks like you replaced the base layer animations but not the animations corresponding to the equipped weapon.
 
Are you in a first or third person perspective? If you're in first and want to use the humanoid animations you'll need a tool such as FPS Mesh Tool. This page has more info:


There is a lot to the demo animator controller so I highly recommend that you create your own controller. This will allow you to play the exact animations and states that you want to play. This page has more info:


As a quick test you should be able to use the existing animator though. It looks like you replaced the base layer animations but not the animations corresponding to the equipped weapon.

Hi, I am happy about your first question as I have a doubt of the asset: I am gonna use both perspectives first and third, but I do not want to use separate arms for the first perspective (I perfectly know the downgrade of performance of loading always the rest of the body), so, it is possible for the asset to use the same animation for both perspectives? Really I only want to move the camera from one to another view with the same model and animations. As I am an artist too I do not need FPS Mesh Tool but thanks.
 
There's no specific reason you can't use the same materials and animator for both views, as far as I know. Just be aware that the animator controllers in the demo scene for the first person arms and third person character are set up differently.
 
Top