I am making an RTS game and things like RTS camera, unit seletion and path finding are almost done.
But I don’t know what is the best way to handle many characters/units. What should I use? Character controller or rigid body or scripted character?
I know combining meshes and textures are good way to reduce drawcalls so I made the soldier model and the wepon as single mesh. Should I consider combining group soldiers into a single mesh? It seems there are some ways to do it at runtime but is it a logical thing for a group of soldiers walking on terrain?
I would suggest you to use rigidbodies, freeze their rotation and use Rigidbody.MovePosition and Rigidbody.MoveRotation to control their movement. Another approach would be using AddForce to move them.
Character Controller is not meant to be used on multi characters, that would kill the performence of your game.
Scripted characters without rigidbodies are not sensitive enough to collision.
About the combining, I don’t see much need to worry about that. As long as you are not making the next Empire: Total War game, and you are going to keep 100 characters at screen at once at most, it would work quiet well. I’m working on a game and right now I’m rendering 100 animated 2500 poly characters with acceptable performance on low end computers.
My character has a rifle on his hand and a bayonet on his belt. I want to make animations for bayonet mounting and dismounting but I don’t want to double the drawcalls by making the bayonet a seperate object.
Should I try to handle the bayonet as a part of the body, which means one extra bone for bayonet per char
OR
should I try to use the “combine children” method?
I don’t have any idea about the second option but the first option seems doable by using AddMixingTransform to control the bayonet’s position on other animations like walk or idle.
You are a very good coder. 8)
With 30 guys ( this model http://www.3drt.com/3dm/characters/marine-02/marine-02-shots.htm ), performance drops seriously on my C2Q 8300@3Ghz + Geforce GTS250. I have better results with Blitz3D. It misses “vertex animation” has Unity3D.