IK problems with UTPC

Hello,

I bought UTPC a couple of days ago and Ive been trying to setup my character using Kubold animations for movement and pistol.

Most of the problems that I have on my custom character are from the Character IK script:

1) I figured out that if the character has nothing equipped the Upper Arm and Hands weight should be 0 or the character has its hands going up.

2) When I pick a pistol and I aim the character isn't gripping the pistol correctly, I dont know if the problem is in the skeleton (it's from Daz and has a perfect T pose) or I have to do some manual setup somewhere. The other problem is that even if I change the weight of Upper Arm and Hands to 1 and then look down only the hands are rotating down not the whole arm. It works for up rotation but for some reason doesn't for looking down.

While I'm at it, I've been wondering how to disable hip fire and make it a requirement for aiming to have a weapon equipped, I don't want the character camera to zoom in if you aren't holding a gun. I couldn't find where to set up a requirements for zooming.

I enjoy using the controller so far!
 
1) Watch this video from around the 11:20 mark - Justin demonstrates using the state system to set the hands weight to 0 based on the current state:

2) I recommend reading through the following page, which contains examples very similar to what you're describing and once again utilises the state system: https://opsive.com/support/document...er-controller/items/perspective/third-person/

3) This also involves the state system. You can just have the Aim item ability be disabled whenever the unequipped state is active - in the character's Inventory component there's an "Unequipped State Name" field, which is set to "Unequipped" by default. So you'd use this state to trigger the disabling of the Aim item ability.
 
1) I have created the state and added it but for some reason its never active only Default is even though I have the pistol equipped (it's in the default loadout)

What Im able to do is change the name "Pistol" to "Aim" and it gets activated when I ADS, but for item equipment for some reason doesn't work. I don't know if I should set it up like this because Im planning to buy Ultimate Inventory and it may have different setup for the state that plays when its equipped.

items.png

weights.png

2) I will give it a try after I solve the issue above

3) I created the unequipped state and added it under Aim (states), it never gets Activated though

1111111.png

I can't attach more images but the Unequipped state has Aim Preset - Enabled = False

Camera also has the Unequipped state and I set CanZoom = false.

I can only activate both manually through the inspector and I get those two warnings when I hit play

Error: Unable to find block state with name "Nothing" within state Unequipped on object Opsive.UltimateCharacterController.Character.Abilities.Items.Aim

Error: Unable to find block state with name "Nothing" within state Pistol on object Character (Opsive.UltimateCharacterController.Character.CharacterIK)
 
Last edited:
For the "Pistol" state, in the Item Set Manager you shouldn't have MyPistolBullet in slot 1, just MyPistol in slot 0 and leave slot 1 empty, similar to how the item sets are configured in the demo:

1596541261564.png

For the "Unequipped" state, I forgot to add that you should also have that preset be activated by the "Body" state too (matching the state name of the Body item set).
 
I fixed the first issue by removing PistolBullets from Slot1.

As you can see in my ItemSetManager I dont have the Body item set. I dont know what's the purpose of it but I see it in the demo. I'm only using the third person controller.

As I said I will start using UIS and I don't want to have a lot of items that I will have to rework in the future
 
Turns out that the Unequipped state won't get activated if you start the game with no items equipped - it's only activated if you have an item equipped, then un-equip it. This is an issue that will be fixed in the next update. For now you could just manually set the "Unequipped" state when the game starts (checking if the player has no items equipped first).

One other thing to remember is that the camera has a zoom feature which is separate from the Aim ability, so even if the Aim ability is disabled the player can still zoom with the camera. If you want to disable this too, you can just have another preset on the Camera Controller which disallows zooming whilst in the Unequipped state.
 
Thanks I will be waiting for that update and I have already setup my camera to disable the zoom.

I figured out that I wont be able to solve the second issue until my final character is done. I hope that it will be possible to remove my dummy and add the final character at the end without having to setup the components from scratch.
 
I fixed the Unequipped not being called at the start yesterday. You can apply this fix by adding the following to the top of InventoryBase.Start:

Code:
            // The character starts out unequipped.
            if (!string.IsNullOrEmpty(m_UnequippedStateName)) {
                StateSystem.StateManager.SetState(m_GameObject, m_UnequippedStateName, true);
            }
 
Top