Hi, The scripts for my game are almost complete. What i need is only to do a simple AI the enemy aim to you and shoot and change move direction when it collide with a box collider there is a tutorial for do this?
You can do a simple finite state style AI with different stimuli changing the state i.e. colliding with an object calls a function avoid() which sets the AI state to avoid mode. Each time the AI updates it checks what state it's in and acts accordingly. You can do this with if statements but you're likely to have a lot of states so might be better with a switch. Something like: switch(state){ case "idle": // move to a random location or stand still break; case "alert": // AI is aware of an enemy and moves toward it break; case "shoot": // Enemy is in line of sight and firing range, shoot break; case "avoid": // AI hit an object, move around it break; } You can also have multiple states like shooting and walking or morale etc.
Hints: Use Character controllers on your Characters. They have a Move function to make moving in a direction easier. They are also good for using ramps(stairs) and general movement issues. For rotation I suggest the RotateTowards that can be found on the Script Reference for turning slowly. transform.lookat can be used for instant rotation or constant rotation towards an object. For examples on how to make a gun and a Firing script, See the FPS tutorial.
for modeler what do you mean? the program who i have used for made the tank or a tool inside unity? if you mean the program i have used 3ds and all pivot are align correctly (i have test also with another models)
ok i resolved this but now i have got a new problem, when i create a build the IA doesn't work... tank doesn't follow the IA and stay freeze...
Ok, I did a search too and it seems to be a bug unless there is a problem in your code we don't know about. If it works in the editor, but not in the build it is almost always a bug though so file a report.