Quantcast
Channel: Answers by "rabbitfang"
Viewing all articles
Browse latest Browse all 59

Answer by rabbitfang

$
0
0
*Since you improved your question and code so much (though the code still has a few style issues)...* CharacterController disables Rigidbody physics on your object (try it; an object with a rigidbody with gravity (just so it is easy to test as it should fall) on won't move with a CharacterController attached even if it is disabled). So, you have 3 options: 1. Take out your character controller and use only rigidbody to get your desired behaviors. 2. Take out rigidbody and try to simulate physics with position moving and velocity modifying. 3. Complain to Unity Technologies that they should work together. Number 3 is a little extreme and probably won't get your problem solved any time soon. So go with number 1 or 2. Which one you pick is dependent on which is more important, the CharacterController or the Rigidbody, and how much can the component behavior be imitated in code. If you only need the Rigidbody for jumping and gravity, I would stick with using the CharacterController.

Viewing all articles
Browse latest Browse all 59

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>