Search Unity

Question Character Controller Set Velocity

Discussion in 'Visual Scripting' started by CapFirst, Aug 20, 2022.

  1. CapFirst

    CapFirst

    Joined:
    Aug 14, 2022
    Posts:
    1
    Just Starting to learn unity started with Visual Scripting because I think it will help me learn C#. While building my character controller trying to implement gravity and there are no units that directly can set Character Controller velocity. I know I can use the simple move unit, but is there any way I could make a custom unit that will set Character controller velocity based on a vector 3 input?
     
  2. POOKSHANK

    POOKSHANK

    Joined:
    Feb 8, 2022
    Posts:
    312
    your choices are either moving multiple times for varied forces like gravity and walking or switching to a rigidbody controller. i switched very late into having one because it just felt way too difficult to get it to feel like it was even remotely controlled by the world's physics
     
  3. REDACT3D_

    REDACT3D_

    Joined:
    Nov 8, 2020
    Posts:
    222
    pc.PNG states.PNG walk.PNG jump.PNG swim.PNG I made up this character controller using visual scripting. Uses a State machine to handle changes in interactions. used it a few times in different projects now. a good drag and drop template for what I need.

    Can Run,Walk, Crouch, Jump and swim.
    also with head detection so you can't jump or un-crouch while obstructed.

    The state machine is placed onto the character controller. the camera object is a child of the player controller.
    will need to add a layer for water to swim in and such.
     
  4. REDACT3D_

    REDACT3D_

    Joined:
    Nov 8, 2020
    Posts:
    222