Skip to content

v0.3.0-b The Third Person?

Latest
Compare
Choose a tag to compare
@boaheck boaheck released this 22 Jan 13:41
· 4 commits to master since this release
5c3c950

Reminder that You can Pay What You Want to help support development of this project Here (with password TFP)

Version 0.3.0-b adds third person support and a lot of other useful stuff. Many of the changes made here were actually developed for my game Bubbo: Adventure On Geralds Island which was released as part of The Dread X Collection 3 and so much of this update has been tested in a heavily movement focused commercially released game. They just barely managed to handle everything I threw at them there so maybe the third person support isn't what you want to be using for the next big physics based 3D platformer but it's certainly serviceable for a most of what you might want to do with third person controls. Another thing I developed for Bubbo was a new way to handle Input for TFP. Initially the new system adds a scriptable object which you can use as a reusable control configuration for all of the instances of TFP in your project, however where it really shines is that you can extend it to support other input systems such as Unity's new input system, Rewired or, as I did for Bubbo Sinput by Sophie Houlden. You can find my Sinput support in this Gist

v0.3.0-b changelog:

  • Third person support
    • Simple Third Person Camera
      • Not recommended for use in a full game
    • thirdPersonMode option on FPSController
      • This enables third person mode and reveals the following options:
        • walkBackwards: Is it possible to walk backwards or should the player turn to face backwards
        • strafe: Is it possible to strafe or should the player turn to face the side
        • turnSpeed: Speed of character turning in degrees per second. Set to 0 for instant turning
        • sprintTurnMult: Speed that you turn when sprinting relative to Turn Speed.
        • cameraAlignSpeed: Speed of character aligning to the canera direction in degrees per second. Set to 0 for instant turning
  • Custom Input Support
    • New field customInputSystem of type TFPInput on FPSController
      • If left empty TFP will use its default input system, if you put a TFPInput object in it will use the input functions from that
    • New ScriptableObject class TFPInput:
      • Functions as a reusable input configuration
      • Can be extended to support different input systems (see my Sinput support Gist)
  • New Gizmo for the FPSController shows CharacterController skin width capsule and step height indicator
  • Contents of the Helper script folder moved to new namespace: TheFirstPerson.Helper
  • New "movementEnabled" variable on FPSController to disable all movement entirely.
    • Is available as part of data in Extensions.
  • New function available to override in extensions ExPreMoveCalc:
    • Executes before movement is calculated but after input is processed.
    • This is useful if you want to modify variables that will be used in movement calculation
  • New Example Extension DebugLine
    • stores a history of the controllers position.
    • renders a line along your movement for the last n seconds (gizmo's need to be enabled to view)
  • fixed issue where updating jump height variables in playmode wouldn't recalculate the jump speed and gravity variables