video thumbnail 33:47
[Unity Tutorial] First Person Controller: Spherical Worlds

2014-10-02

[public] 147K views, 2.87K likes, 23.0 dislikes audio only

Hi there, welcome to this tutorial on creating a simple first person controller that will function on spherical planets.

Updated source code for Unity5: https://github.com/SebLague/Spherical-Gravity

Original source code: http://pastebin.com/YBbFGZzD

Download the world model package by @danielsound here: https://www.dropbox.com/s/ul53h1g3nb5b9ed/Spherical%20Gravity%20Start%20Pkg.zip?dl=1.

Find out more about This Little Piggy here: /youtube/video/H7-3dZTERf0

Support the channel: http://bit.ly/SupportGamedevTutorials


apply the gravity attractor script to the planet
/youtube/video/TicipSVT-T8?t=86.049004
get a direction between two objects just by subtracting their positions
/youtube/video/TicipSVT-T8?t=183.42
create a vector3 for our target
/youtube/video/TicipSVT-T8?t=1026.179
create a public layer mask
/youtube/video/TicipSVT-T8?t=1541.0601
create a layer for the ground mesh
/youtube/video/TicipSVT-T8?t=1888.67