Justin's best answers

  • Justin

    Best way to change footstep audio based on velocity?

    This will require modification to the CharacterFootEffects component. I recommend subclassing this component to make updating easier. Let me know after you get it implemented what methods I should mark as virtual.
  • Justin

    Dropping Clip On Reload

    It is likely an animation event issue because I can't see anything wrong with your inspector. On the shootable weapon page there is some documentation on the reloadable clip but I'll work on getting a more detailed page written.
  • Justin

    What Preset Sets Camera Zoom

    Ah, that state gets set with the Zoom State field on the Camera Controller inspector. If Append Item is selected then the item name will be appended to the zoom state name.
  • Justin

    Has Received Event not working as expected

    When is that event sent? Has Received Event is looking for the generic <object> version of the event, so you'll need to make sure you use ExecuteEvent with the generic object: behaviorTree.ExecuteEvemt<object>("SoundHeard", (object)myVector3);
  • Justin

    How do you properly switch equipment?

    This page should help: https://opsive.com/support/documentation/ultimate-character-controller/artificial-intelligence/
  • Justin

    Does not change the volume of footsteps

    You can still create the Audio Source manually on the character and it'll use that Audio Source.
  • Justin

    Changing first person hand positioning

    It doesn't look like the state system or presets will help this case. In third person you can use Unity's IK system to position the left hand, but that's not possible with generic models. The proper fix for this is to adjust the animation in order to match the weapon.
  • Justin

    Clip Reloading Animation Issue

    Thanks for the detailed post. It looks like you are doing things correctly and I think that I see what is going wrong. Within CharacterIK.PositionHands change line 874 from: targetWeight = 1; to: targetWeight = m_HandWeight; The targetWeight was always 1 and ignored the hand weight so...
  • Justin

    Having Issues Building Items At Runtime

    m_CharacterLocomotion is assigned within Awake which gets executed immediately after the Item component is added. The item isn't positioned under the character until later so that's why you are getting the error. This looks like I'll need to expand support so items can be created at runtime.
  • Justin

    Saving my animator controller

    Unity maps the files based on a guid and when you rename the guid doesn't change so that's why it was overwritten. I recommend duplicating instead so you'll get a new guid, or even better, start from a new animator controller.
  • Justin

    Aiming IK Preset Per Weapon

    You can use the state system:
  • Justin

    No Punch/Kick Animation

    Your movement set ID should be 2 but beyond that the best way to debug would be to enable animator debugging on the Animator Monitor and take a look at the parameters to see why it's not changing into the punching state.
  • Justin

    Runtime Pickup

    Once you have added the first person arms to your character you can remove the item through the Item Manager. You do not want to manually remove any GameObjects. This will then allow you to follow the tutorial since the item pickup system will be able to find the first person base object on the...
  • Justin

    Message Monitor OnAbilityMessageCanStart Event

    I would override the AbilityMessageText property so you can then provide more details on the pickup item type. The ability message monitor will then display the overridden property.
  • Justin

    Problem with basic controller continuing to fire

    Take a look at this page for a list of things that may be going wrong when trying to fire: https://opsive.com/support/documentation/ultimate-character-controller/items/actions/usable/shootable-weapon/ Coburn64 was referring to the second one in that list - this is especially important if you...
  • Justin

    [UFPS 2] Following setup guide leads to errors.

    It looks like you created two different categories - make sure you only have one when you first get started. By default the "Items" category is created and you'll want to add all of the Item Types to that category. I would follow along with the videos exactly by naming everything the same and...
  • Justin

    How do you access Global Variable

    You sent an email about something similar, correct? Player is of type Object, but Target GameObject is looking for a GameObject. If you switch Player to a type of GameObject then you'll be able to find the variable.
  • Justin

    Can't jump while moving sideways or backwards

    This relates to the ability message. In 2.1 there is an option to not check for ability start for that message. Is AbilityStarted called? If CanStartAbility returns true then this method should be called at the minimum. You can also debug the animator by clicking on the Animator Monitor...
  • Justin

    Cant get pistol dual wield to work.

    Oh, third person should be easier :) My previous comments were related to first person so disregard those. It sounds like the main issue that you are having is that the left hand gun switches to the right. Under the Third Person Perspective Item does your left pistol point to the correct...
  • Justin

    Problem with AbilityMessage

    I'm kind of surprised that that worked - the get doesn't have a return value if m_Interactable is null so it shouldn't even compile. The existing code uses string.Format so within the inspector of your interact ability make sure you specify where the interactable message should be located...
Top