Jump to content

Inverted turret axial movement (BDA)


Recommended Posts

Hello everyone. :) 

I'm trying to make a turret for the BDA, but I noticed that the axial movement of both the tower and the cannon are reversed, for example: I move X degrees to the right, but the tower moves those X degrees to the left. In the CFG configuration, the cannon minPitch = -4 and maxPitch = 20, if I try to raise the cannon 20 degrees up it goes 20 degrees down, and so on.

I would like a solution to this problem. =/

* Sorry for my bad english *

The Tower CFG:

PART
{
// Kerbal Space Program - Part Config
// 
// 

// --- general parameters ---
name = turretOlkh
module = Part
author = BrendoSturmgeschutz

// --- asset parameters ---
mesh = model.mu
rescaleFactor = 1


// --- node definitions ---
node_attach = 0.015774, -0.642385, 0.001704, 0, -1, 0, 0

// --- editor parameters ---
TechRequired = precisionEngineering
entryCost = 3500
cost = 5000
category = none
subcategory = 0
title = Olkh Turret Cannon
manufacturer = B.M.I
description = A 120mm cannon on an armored turret.
// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
attachRules = 0,1,0,0,1

// --- standard part parameters ---
mass = 2.1
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 2
crashTolerance = 110
maxTemp = 3600

stagingIcon = SOLID_BOOSTER

MODULE
{
    name = ModuleTurret
    
    yawTransformName = rotacao
    pitchTransformName = levante
    
    pitchSpeedDPS = 60
    yawSpeedDPS = 40
    
    minPitch = -4
    maxPitch = 20
    yawRange = 360
    
    smoothRotation = true
    smoothMultiplier = 10
    
    audioPath = BDArmory/Sounds/hydraulicLoop
    maxAudioPitch = 0.42
    minAudioPitch = 0.15
    maxVolume = 0.60
}

MODULE
{
    name = ModuleWeapon
    
    fireTransformName = fireTransform
    
    hasDeployAnim = false
    
    hasFireAnimation = false
    
    roundsPerMinute = 10
    maxDeviation = 0.2
    maxTargetingRange = 5000
    maxEffectiveDistance = 5000
    
    bulletMass = 5.50
    bulletVelocity = 1500
    ammoName = CannonShells
    requestResourceAmount = 1
    
    cannonShellPower = 25
    cannonShellHeat = 35
    cannonShellRadius = 35
    
    hasRecoil = true
    onlyFireInRange = true
    bulletDrop = true
    
    weaponType = cannon    
    
    projectileColor = 255, 90, 0, 190
    
    tracerStartWidth = 0.27
    tracerEndWidth = 0.20
    tracerLength = 0
    tracerDeltaFactor = 3.75
    tracerLuminance = 2
    
    maxHeat = 3600
    heatPerShot = 60
    heatLoss = 740
    
    
    fireSoundPath = BDArmory/Parts/BGM/sounds/canhao
    overheatSoundPath = BDArmory/Parts/50CalTurret/sounds/turretOverheat
    oneShotSound = true
    showReloadMeter = true
    reloadAudioPath = BDArmory/Parts/BGM/sounds/carregamento
    
}


RESOURCE
{
    name = CannonShells
    amount = 20
    maxAmount = 20
}

}
 

Link to comment
Share on other sites

On 28/12/2016 at 2:29 AM, Sturmgeschutz said:

but I noticed that the axial movement of both the tower and the cannon are reversed,

Hi the inverted rotations are likely caused by incorrectly rotated yaw and pitch transforms, Without exception these should always have zero local rotations and be arranged  to match unity's rotation as below, there are a couple of other arrangements possible but for the most straight forward hassle free use ,  use only this method

YfqmzFT.png

And here's a demo project that i made a while ago but still relevant and produces working turrets

https://www.dropbox.com/s/ra4ct7f52m8r6ya/BDAc U422 DemoScene.zip?dl=0

and a link to the post

 

On 28/12/2016 at 2:29 AM, Sturmgeschutz said:

bulletMass = 5.50

 So you have 120mm shell that weighs 5 1/2 tonne??? maybe you should reconsider your values

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
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...