Justin's best answers

  • Justin

    Activating state on camera whilst sprinting?

    When the Speed Change ability activates you can have a View Type state which also activates. Take a look at this video for an overview of the state system:
  • Justin

    Error when trying to add States to abilities or scripts

    This likely relates to the location that you are trying to save the preset in is not within the current project. Make sure the directory that you have selected is within the project that you are working in.
  • Justin

    Animation Transitions

    Have you seen these pages? They give an overview of how the animator controller is structured. https://opsive.com/support/documentation/ultimate-character-controller/animation/animator/animation-animator-structure/...
  • Justin

    How to search one tree was referenced by which trees?

    There currently isn't a good way to search for this. Part of the issue is that the trees aren't loaded until runtime so the current tree doesn't necessarily know the next tree that is going to be loaded (and the trees can be loaded dynamically which also makes it more of an issue).
  • Justin

    How to set the Preset of Default state?

    You're right - in UltimateCharacterLocomotion the TimeScale property has the [NonDefaultSerialized] attribute. I need to think why I added that attribute but if you remove it then it'll work.
  • Justin

    How to add an item by pressing a key?

    You'll want to use that pickup script from the inventory documentation in your new script. Your new script would have to translate the string to an item type which you could do by searching the name of the item type.
  • Justin

    Shell Eject Not Ejecting

    Does your shell have the trajectory object on it? You'll want to make sure you create it from the object manager: https://opsive.com/support/documentation/ultimate-character-controller/objects/trajectory-object/shells/
  • Justin

    Swimming Ability

    Within the agility pack we have a hang ability that disables gravity and all of the collisions. I did notice some issues with this inside the collision detection part of the code and this sounds related. This will definitely be fixed in version 2.1, but I think that the only change that you need...
  • Justin

    Error: Unable to add MyPistol (Opsive.UltimateCharacterController.Items.Item) because the slot id is greater than the number of slots that exist in th

    I have a fix for this - open ItemBuilder.cs and add the following under "NEW" to AddFirstPersonObject: var baseObject = firstPersonObject.AddComponent<FirstPersonController.Character.Identifiers.FirstPersonBaseObject>(); baseObject.ID = maxID + 1...
  • Justin

    How to run both FPS and TPS in same scene with gun

    We don't have a combined video for items though I should probably create one. The first person view is better to watch though because first person requires more work to setup. The text documentation does go through and include an example with both first and third though...
  • Justin

    Punching/Kicking not working in Demo scene

    The version sent to the Asset Store didn't have the Body ItemType in the default loadout so that's why you are unable to punch/kick. Once you add this ItemType you should be good to go in the demo scene (I've adjusted my build script to not strip out the body type).
  • Justin

    Trouble with newly created character

    Do you have a scale set on your character or any child objects? All scales must be (1,1,1) until the next version. Beyond that what happens if you disable the CapsuleColliderPositioner? If it still doesn't work and can send me your scene I can take a look at it.
  • Justin

    Vehicle sinks on game start

    For a tank (or any vehicle) I recommend getting an asset that is dedicated to being a controller for that. The controller was designed for more organic objects and while I am sure with enough work you could get it working well with a tank it would take a lot of modifications to do properly. For...
  • Justin

    Question about Health Flash Monitor

    Ah, I think that what you're looking for is the Damage Indicator Monitor. This will show the arrows in the direction that the character was hit. It doesn't show based off of the impact amount though.
  • Justin

    How to implement transform.LookAt?

    Happy New Year! For this you'll need to create a new ability - this will allow you to define how your character is rotated so the Deterministic Object Manager won't override the change.
  • Justin

    Character not rendering in place

    Since you are using a custom animator it doesn't look like the base layer has IK Pass enabled. This will prevent the base layer from being positioned correctly.
  • Justin

    Zoom and SpeedChange

    The Aim ability is a little bit different in that it has two activation states: one when the character is in first person, and the other when the button is pressed. The aim ability will only stop the speed change ability when the button is down.
  • Justin

    Camera collision layer mask

    The view type uses the LayerManager's IgnoreInvisibleCharacterWaterLayers mask for determining which objects it should collide against. If you adjust the Invisible Layers on this component then it'll change which layers are used.
  • Justin

    changing bob parameters has no effect

    Ahh, ok, I was thinking that the fields weren't being updated. Yes, I am changing the fields highlighted in your screenshot @dandesign. The camera will loosely follow the character's head position - you can adjust how closely it follows this head position by adjusting the Smooth Head Offset...
  • Justin

    Stop animation on collision

    This would require a new ability. I can add it to my list of abilities to add to the base version because I like the idea.
Top