1
\$\begingroup\$

My game is played on a big spherical world. Made up of a big spherical mesh with sphere collider, with 'gravity' at it's center (gravity for objects is controlled trough scripts).

Now if I put a ball (spherical rigid-body) on there and push it, it will just go around as expected. But when I try to add an object with character-controller and move the character it will always stand as if the gravity is pointing up, and not at the center of the big sphere.

Since there is apparently no way to rotate the character-controller component (it's made for flat worlds) What are my options for controlling my characters on this spherical world?

\$\endgroup\$
1
\$\begingroup\$

Looks like the options are ...

  1. Implement your own version of the rigidbody script.
  2. Make your world a whole lot bigger and rotate it under the player as they move rather than rotating the player round the world.
\$\endgroup\$
1
  • \$\begingroup\$ Rotating the world would be too unpractical, plus it wouldn't look spherical (unless you use shaders to bend the vertexes). I created a script following this tutorial: youtube.com/watch?v=CZeUpF6r5FY \$\endgroup\$ – zoran404 Mar 28 '15 at 14:58
0
\$\begingroup\$

Don't use character controller, instead of it use rigidbody+capsuleCollider and then control rotation and forces with script as Wardy stated. Here is a video that may be helpful: Video

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.