Game Development Stack Exchange is a question and answer site for professional and independent game developers. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
Anybody can answer
The best answers are voted up and rise to the top
First post here. So I am a newbie to Unity and am willing to create a general character controller script to base my future characters. I understand a character’s mechanics are pretty design (UX) dependent and I will need a few varients.
What I want
Momentum-wise accurate physical simulation (as much as game performance allows). Some examples:
- If a flying canon-ball hits the player, it shall be crashed or flown away (some parameters would let us kill him in code hopefully) in accord with ball’s momentum and player’s mass.
- If the player hits a stationary canon-ball the ball most-probably wouldn’t move (due to friction), yet if they push enough it gains some torque and rolls-over. Rotational and kinetic energy would need equal energy provided.
- Multiple player’s could act upon a bunch of pieces just for fun.
- Regular character capabilities such as stair/ladder climbing, walking, etc.
What I have read so far:
- CharacterController needs to write code for desired physics, and apt when not so interactive characters (e.g. first person shooter) are at hand.
- Rigidbody is good for non-agent dynamic items (e.g. falling boxes), and is hard to implement for agents (muscle powered humanoids, etc.), though possible.
What I ask
Has anyone ever come across such Git Repo/Unity Asset or a tutorial/sample code? Moreover, is it actually possible to have momentum-wise accurate physics (regarding collisions) in Unity engine?