I'm trying to create a simple tank based game and basically I wan't to have a tank move forward with W, back with S, turn right with D and left with A in a simple world (the floor will always be the same height and the walls are quite simple) my problem is I've tried to implement it before and always had some problems with it not behaving exactly as it should. My question is what is the best practice way to do it: by using a Rigidbody and AddForce, or by using a Character Controller, or by just manually setting the positions and handling collisions myself?
Thanks, in advance :) - James
asked May 27 '11 at 11:52 AM
Believe me, the Character Controller is easier to use. Just add the prefab Standard Assets/Character Controllers/First Person Controller to your scene. It has built-in controls which allows left-right and forth-back movimentation, but doesn't turn. You can disable or delete the 3 built-in scripts and add this one:
It's very simple, but does the job: it goes forth and back, turns to right and left, and DOESN'T jump, which would be very strange for a thank!