Posted: Tue Jul 01, 2014 7:58 am Post subject:
Spawned model not rotating with turret
Has part of an experiment I have a tank which can spawn a gun (has a separate game object) using 'SpawnBehavior' module and a 'CombinedInfoModule' so it can dock to a bone (the bone information is correct).
My issue is that because the gun is attached to a bone on the tanks turret, the actual gun never turns when the tanks turret turns. It moves with the tank, but it is only in the correct position on the turret if the turret is facing forward.
The spawned gun has a 'SlavedUpdate' that has settings that mean that it cannot move about, yet I assumed that because it was supposed to be attached to a bone that was part of the tanks turret hierarchy, it would rotate along with the turret.
Is this normal behaviour for attached spawned models?
Is there some other way that I can get this to work? _________________
Are all your bones correctly declared as extra public bones?
Also it indeed might have to do with the turret rotation not replicating on other things.
Also do you need it as a separate game object? A turret with its own AI update should suffice. _________________ QUICK_EDIT
I only declared the 'CombinedInfoModule' attach bone has an extra public bone.
There are advantages and disadvantages to having the gun has a separate object. One advatage is that because it is a separate object it can have its own weapon category (in this case a 'GUN' category vs the tanks 'CANNON' category) this means that the turret will always prefer infantry targets regardless of what the tank object is firing at.
While using special and object filters should allow a similar effect from a single 'GameObject', due to issues with the C&C3 weapon code, it never really works correctly especially when the weapons have differing ranges (the RA3 weapon code was a big improvement).
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum