Hi guys,
Im new to Unity and trying to build my first prototype game. Its a first-person game.
So Ive encountered my first questions/problems for this development.
Starting with basic mechanics, wich is moving around, I cannot find the best solution for the options I have wich would be to make a character movement/collision using:
1- Character Controller on a capsule. Ive applied this pre-made script to a capsule and created an additional movement script, just to move the capsule around, linked the camera as child of this capsule with the Mouse Look scripts to look around. This seems to move the capsule around and the mouse look are OK, but when I try to move up some stairs (geometry) with 0.2 meters of height (20 cm), the capsule gets stuck. Ive set the Step Offset option from values ranging from 0.1 to 1.0 and still the problem persists (Im using the default capsule size wich is 2m height and followed the instructions etc.)... Also, seems to me that this Character Controller component will not behave as real physics, for example, suppose Im walking and tumble on street cones, or trash cans or any other object that a character would easily move or knock down, I dont think this Character Controller will give me this possibility?
2- Rigidbody on a capsule. Ok, so I tried this other alternative, made the movements by applying AddRelativeForce and the character moves around and the mouse look are OK, gravity works OK. Now, I think this option will let me handle the physics with objects Ive mentioned like street cones, trash cans etc. so this would be OK also. The problem now are: Stairs and inertia of movement. The stairs now work better than Character Controller, but the character tends to slow down when going up the stairs, and the movement is rather irregular, because of the stairs so you can actually "feel" the chacter moving up stairs. The other problem is inertia. Since it is adding force, when turning the character (with mouse look) 90 degrees sideways, the character still moves a bit in the original direction, because of inertia I assume, so this gives a "sliding" effect wich is not good.
So I have thought of creating flat ramps for the stairs but, this will give an overload of work not only for modeling but to set wich objects in game will actually be the colliders, so, for instance in a scene with buildings, houses that use stairs, this would give additional and tedius work of having to create extra geometry just for the ramps, setting these as colliders instead of importing all and setting them as colliders.
So, I hope I have not written too much for you to read, but my question is:
What would be the best solutions for these troubles? 1-(Stairs/Step Offset with Character Controller) 2-(Stairs/Inertia with Rigidbody)
Would someone with experience please enlighten me on these subjects?
Thanks in advance,