Jump to content

TurretShape mount to vehicle


Recommended Posts


I would like to mount a Turret to a vehicle. Does anyone know how I can do this? Note I dont want to just mount an image, I want a working Turret. I have created a working turret but am not sure how to mount a 'TurretShape' to a vehicle.

Link to comment
Share on other sites

Hey flysouth, when you say that you have a working turret, do you mean when you mount it, you can aim in 360 degrees and fire it. I made a Jeep with a mounted turret but it was just like the cheetah turret but a machine gun. The cheetah datablock has a mounted turretshape as an example. If your working turret is fully able to be aimed, I would love to see the code.

Link to comment
Share on other sites

Hi Jason

I have worked out how to mount it.. but I cannot get it to move.

The cheetah turret is just mounting a static image using the ShapeBaseImageData datablock. I am using the TurretShapeData datablock.

What I have is a separate barrel mesh and turret mount mesh. The datablocks are then defined like a deployed turret which mounts the barrel on the turret mount mesh. This mesh has a mount point and a pitch point and in theory should move using the setTurretEulerRotation function. I then mount this scripted turret as an object to the vehicle. But this is where thing dont seem to work. I have posted on this forum to see if anyone knows what the problem is.

It also has another problem which I believe is a bug in the engine. The turret does not stay in perfect sync with the vehicle when the vehicle moves. I have seen a code fix for that problem in these forums

If i set rotate to true then the turret mount and barrel turn perfectly together - just in the editor

I will post evrything here once I get it working

Link to comment
Share on other sites

@ Johxz

Thanks - But that is the well documented 'easy' part and I figured that out. I now have a scripted turret with barrel mounted on my vehicle. The part where I have not seen a single document or tutorial or working example is how to control the turret and weapon. setTurretEulerRotation appears to be the command but does nothing even if typed in at the ~ console. Is there a bug in 3.8? Can somebody test it and tell me if it works for them.

Link to comment
Share on other sites

Thanks I will take a look. I was hoping not to modify the source.

This stuff is 5 years old. Why has it not been fixed in the current engine?

Okay I tried to mod the source files but failed due to the fact that some of them have had such major changes that the bug fixes are no longer compatible and will reuire some serious investigation to patch - so back to the drawing board.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...