Jump to content

Can I manually rotate a vehicle's turret if I know its animation name?

Recommended Posts

I've confirmed that "mainTurret" is the correct name of the animation that rotates the turret with

getText (_turretConfig >> "animationSourceBody");

So this shoud insantly rotate the turret 90 degrees to the right, right?

_tank = vehicle player;
_tank animateSource ["mainTurret", rad 90, true];

The player is in the commanding position, other crew positions are filled. The turret stays stubbornly immobile. As usual Arma 3 gives absolutely no error messages.

I can workaround using doWatch and triggernometry, but I feel it would be better to use the animateSource, right?

// untested pseudo code
_deg = 50;
_radius = 100;
gunner _vehicle doWatch ([getPos _vehicle,[_radius * cos(_deg),_radius * sin(_deg),0]] call addToArray ); // makes the gunner watch 50 degrees when placed in an infinite while loop so as the vehicle moves the watch point moves.


Share this post

Link to post
Share on other sites

Man the closest I can get is this:

ugv = vehicle player;

ugv animateSource ["turret", 0];
ugv animateSource ["mainTurret", rad 0, true];
ugv animateSource ["mainGun", rad 0, true];
ugv animateSource ["mainTurret", -rad 90, true];
ugv addAction ["Show Turret", {ugv animateSource ["Turret", 0]}];
ugv addAction ["Turret Left", {ugv animateSource ["mainTurret", rad 90]}];
ugv addAction ["Turret Right", {ugv animateSource ["mainTurret", -rad 90]}];
ugv addAction ["Turret Up", {ugv animateSource ["mainGun", rad 30]}];
ugv addAction ["Turret Down", {ugv animateSource ["mainGun", -rad 20]}];

Which is an example I got from the wiki https://community.bistudio.com/wiki/animateSource

It's weird though. It sort of spawns in a turret than can then be moved. I tried with a RCWS stomper (that already has the turret) and it doesn't move it. Weird example IMHO

Share this post

Link to post
Share on other sites

A class with the same source name should also be present in main config in CfgVehicles AnimationSources and have to be bound to the "user" controller for the command to work. If in order to animate door in example below using animate command it would require 2 calls:

In short - no, it's not possible to override animation source of vehicle unless it has extra dummy animation classes (which will brake also AI aiming)

  • Like 1

Share this post

Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now