What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Turret question

Kelthur

New Member
Joined
Jun 24, 2014
Messages
5
Reaction score
0
Hi all,

i got a question. The turret of any tank allways looks in one direction. In the default start direction. It only spins when the bot autoaim something. Is it possible to change that? Did i miss something? I allready googled it but found nothing really usefull.
 
As far as I have searched, there is nothing that can be done.

Also, the cannon points straight down all the time.
 
yeh, it's kinda obvious you're a bot b/c of this. a tank with limited turret traverse or a fixed turret, like the elc amx or a tank destroyer is less obvious.
 
It is because of Camera.

To do that, make a plugin or implement a method in BattleTankBehaviour than uses Camera.LookAt Method when you move to make it look forward (consider the exception of targeting maybe using a bool flag)

Something like (pseudocode)

Code:
if(moving){
  vector3 direction= bot.getTheBotAdvanceDirection();
  If(!notTargetingAnything()){
     Camera.LookAt(direction);
  }
}

Or something similar. Use API documentation to search for the correct methods to use.

To do gun not to look at ground, just do the same trying to assing its vector3.y property to something usefull.

It should solve issue

Edit: remember gun has to values Top/Low so to point middle front just set the middle value...
 
Last edited:
Back
Top