Search Unity

3D Platformer Controller Tutorial Request

Discussion in 'Scripting' started by Fariel, Aug 11, 2015.

  1. Fariel

    Fariel

    Joined:
    Feb 9, 2013
    Posts:
    29
    A lot of the older 3D platformers like Banjo Kazooie, Mario 64, Shadow of the Colossus, etc had very detailed character controllers. A lot of what made them unique, to me, was the ability to climb things as long as they met certain requirements. If there is a ledge, you can climb up it, hang on it, shimmy along it, etc.

    I'd like to learn how to write a character controller that can do things like climb and swim. Those are the two big things that I'd like to learn. I figure if I can learn how to climb and swim with a character controller, I can use that knowledge to do anything else I need to do.

    Are there any tutorials that I can be directed towards that would help me learn how to do this?
     
  2. Uberpete

    Uberpete

    Joined:
    Jan 16, 2014
    Posts:
    78
    Here's an example on how to make a climbing script - for a platformer just replace the FPS controller with your platformer character.

    A quick google for "Swimming in Unity3D" gives this, which I'm linking for the cool bubble effects. For a platformer I imagine you'd need to simulate some sort of buoyancy and water resistance which is essentially playing with the Physics system (add an upwards force along the lines of mass * gravity and apply some drag).

    Hope this helps :)
     
  3. Fariel

    Fariel

    Joined:
    Feb 9, 2013
    Posts:
    29
    What are the advantages/disadvantages to using Mecanim root motion in a character controller like this? Could you use the root animation system to actually climb up something?

    *edit: Both of those resources are awesome, Uberpete. Thank you. Any others showing similar things would be welcome, as I prefer to learn from more than one source if able. :)