How it works...

This recipe uses a very simple concept: a character's collider scaling in runtime. Every collider other than a Mesh Collider has public variables describing its shape. You can alter them in runtime to achieve interesting results such as crouching. You shouldn't scale a static object's colliders and you should try to avoid scaling colliders of objects that have no Rigidbody component (as stated by Unity, this has a bigger impact on the physics engine).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.233.43