Jump to content
Nuufa

Turret's model is turning but the bullets directions isn't

Recommended Posts

I am new to Arma modding. I am making a addon for my squad to play with. Im making a troop transport vehicle with a mg on top like the m113. The turret rotates when i move the mouse but when I fire the bullets keep shooting in the original turrets direction. I have watched videos and searched the forums for a solution for this problem but I haven't been able to find a solution.

 

I'm using Blender for the modeling with the Arma toolbox addon. Many of the posts by the people with the same problem as i have very little responses or solutions that haven't worked for me. The only clue for fixing this, is a forum post I found that had the same problem. 

I have obviously tried the solutions mensioned here but none of them have worked except I didn't understand the last reply.

 

If any of you have experienced this problem and know a solutions or have a suggestion please leave it here or if there is a forum post with a solution that i havent found then link me to it.

 

Also on a side note if anyone knows how to make the models walls not seethough on both sides without extending the walls to make them two planes then please leave it also here. Thank you.

 

Share this post


Link to post
Share on other sites

Sounds like the memory points for the turret (i.e. the bullet source and bullet direction memory points - Osaveze And OsaHlavne) aren't part of the moving turret named-selection (OtocHlaven)

  • Like 1

Share this post


Link to post
Share on other sites

Thanks for the reply. 

 

Now this is the weird thing. I have the memory points "muzzle" and "chamber" for the bullet source and bullet direction. I also have a "gunnerview" memorypoint. Now these three memory ponts are also part of the "gun" vertex group which is the same name as the model's skeleton name for the machinegun part of the turret. 

 

When I go to test the turret in Arma, the gunnerview rotates with the turret. The "gunnerview" memorypoint isn't mensioned in the model.cfg file but the "gun" vertex group is. The "gun" vertex group is attached to the "turret" vertex group in the model.cfg file. So that would mean that the "gun" vertex group from the memory LOD is attached to the machinegun part of the model (or atleast thats what I think).

 

So the problem that im having is that the memory points for the turret are rotating with the turret but the game isn't updating the direction of the barrel.

 

I could be wrong about everything but i have tested and redone the turret many times but i haven't been able to make the turret to shoot where its pointing and I have no idea what i could test to fix this so I asked here for advice. 

 

Thanks in advance

Share this post


Link to post
Share on other sites

Okay..

 

I have finally solved the problem. I found the solution here. 

The turret animation class names in the model.cfg file have to be the same name as the turret and body in the config file.

Here's a before and after of the code that fixed it.

 

before:

config.cpp

 

in the turret class:

                        memorypointgun = "muzzle";

                        gunbeg = "muzzle";

                        gunend = "chamber";

 

                        body = "turret";

                        gun = "gun";

 

                        // animation class

                        animationsourcebody = "turret";

                        animationsourcegun = "gun";

model.cfg

                class mainTurret {

                type="rotationY";

                source="turret";

                selection="turret";

                axis="turret_axis";

                animPeriod=0;

                minValue="rad -360";

                maxValue="rad +360";

                angle0="rad -360";

                angle1="rad +360";

                memory = 1;

             };

 

            class mainGun: mainTurret {

                type="rotationX";

                source="gun";

                selection="gun";

                axis="gun_axis";

             };

after:

config.cfg

 

same as before

 

model.cfg

                class turret {

                type="rotationY";

                source="turret";

                selection="turret";

                axis="turret_axis";

                animPeriod=0;

                minValue="rad -360";

                maxValue="rad +360";

                angle0="rad -360";

                angle1="rad +360";

                memory = 1;

             };

 

            class gun: turret {

                type="rotationX";

                source="gun";

                selection="gun";

                axis="gun_axis";

             };

(The name of the class has to be the same as the body="" and turret="" in the config file)

That is all that had to be changed. All that time that i wondered what could be wrong it was this tiny thing. Always when i googled the problem all i got was that check that the selections are correct. Now looking at the turret config reference wiki page i see that the body="mainTurret" does say that this has to be the same name as the class name but I hadn't noticed it.

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

×