Jump to content

JellyCubes

Members
  • Posts

    141
  • Joined

  • Last visited

Posts posted by JellyCubes

  1. cannonShellPower -- The cs for the module on github says this is 'cannon explosion impulse', is it an arbitrary value or is it a real value measured in N/kN? Does the impulse decrease with the square of distance like a real explosive or is it a constant value all the way to the end of the cannonShellRadius?

    I think it's exactly what it says on the tin. cannonShellPower is an impulse (it uses ForceMode.Impulse in Unity) and is measured in kilonewton seconds (kN·s).

    Objects experience the cannonShellPower impulse at the explosion's centre and decreases the farther away from the explosion. The impulse decrease is neither linear nor inverse square:

    [TABLE=class: grid, width: 500, align: center]

    [TR]

    [TD=align: center]Distance from explosion / blast radius

    [/TD]

    [TD=align: center]Percent of maximum impulse

    [/TD]

    [/TR]

    [TR]

    [TD=align: center]0[/TD]

    [TD=align: center]100%[/TD]

    [/TR]

    [TR]

    [TD=align: center]0.1[/TD]

    [TD=align: center]99%[/TD]

    [/TR]

    [TR]

    [TD=align: center]0.2[/TD]

    [TD=align: center]96%[/TD]

    [/TR]

    [TR]

    [TD=align: center]0.3[/TD]

    [TD=align: center]91%[/TD]

    [/TR]

    [TR]

    [TD=align: center]0.4[/TD]

    [TD=align: center]84%[/TD]

    [/TR]

    [TR]

    [TD=align: center]0.5[/TD]

    [TD=align: center]75%[/TD]

    [/TR]

    [TR]

    [TD=align: center]0.6[/TD]

    [TD=align: center]64%[/TD]

    [/TR]

    [TR]

    [TD=align: center]0.7[/TD]

    [TD=align: center]51%[/TD]

    [/TR]

    [TR]

    [TD=align: center]0.8[/TD]

    [TD=align: center]36%[/TD]

    [/TR]

    [TR]

    [TD=align: center]0.9[/TD]

    [TD=align: center]19%[/TD]

    [/TR]

    [TR]

    [TD=align: center]1.0[/TD]

    [TD=align: center]0%[/TD]

    [/TR]

    [/TABLE]

    Impulse is change in momentum:

    J = m·(ÃŽâ€v)

    where

    • J is impulse in kN·s
    • m is mass in tonnes
    • ÃŽâ€v is change in velocity in m/s

    If the impulse is divided by mass, we get the change in velocity. An object that is 4 tonnes that experiences an impulse of 20 kN·s will have a change in velocity of 5 m/s.

  2. Hi, I'm currently making a 30mm fixed gun, everything checks out, but since I just copied the cfg from the hidden vulcan, the accuracy is all over the place.

    What line of cfg determines turret (or in this case, fixed gun) accuracy?

    And what does maxDeviation do and is there in depth explanation on how it works.

    According to the code, maxDeviation is "max inaccuracy deviation in degrees". So, maxDeviation controls accuracy and is the maximum angle in degrees between the barrel and the bullet.

    I think there may be an error in the vulcan cfg file, though. In the cfg file, it's given as "maxDeviation = 0.1f", but I think the "f" at the end is causing the game to not read it correctly. Removing the "f" at the end (so it reads "maxDeviation = 0.1") causes the gun to be much more accurate.

    Maybe it is reading "0.1f" as a string when it expects a float or something and is defaulting to maxDeviation = 1. I'm still using 0.9.6, though.

    Interestingly, a gun with an accuracy of 0.1 degrees means that all bullets fired will land within a ~3.5 metre diameter circle at a distance of 1,000 metres.

    It actually is related to KF since those white boxes are the water slider colliders (helps us make the repulsors work over water since water doesn't have the same collision as the rest of the planetary PQS crud). The odd thing is that it shows up on a non-KF part and is positioned above the ground. Normally it would always sit below the surface of the planet and only be collided with when the altitude hits below sea level. we're working on trying to get that worked out. As of the most recent version of the mod, the collider should only be active if a KF part is present on the craft, and it should be invisible (theoretically). Work in progress.

    Totally unrelated, but I am suddenly reminded of the scene in Back to the Future 2 where Marty tries to use the hoverboard over water.

  3. Do what I do - change it yourself, shove your one line fix at Baha via github and proceed to feel good about your great contribution :wink:

    ..I never actually asked if that's the prefered way to do things, but hey, if nothing else you get to run your custom dll while waiting for the official patch.

    EDIT: Actually, I did it for you. How does this look? Let me know if it does what you were looking for and I'll send it over to BahamutoD.

    This works perfectly, thanks Yski.

    I've never used github before, so off to find some github tutorials.

  4. Would it be possible to change the maxTorque 'ramp up' of guided missiles to a non hard-coded value?

    In the missileLauncher code, the maximum torque of a missile is:

    finalMaxTorque = Mathf.Clamp((timeIndex-dropTime)*30, 0, maxTorque)

    The maximum torque of a missile is zero when it is launched, and increases by 30 each second until it reaches the maxTorque value.

    I'm having issues with missiles taking too long to reach maxTorque. I created an SA-2 Guideline SAM, but because it weighs 2.4 tonnes, it requires a high maxTorque value of 300. Unfortunately, it takes 10 seconds to fully reach this maxTorque value at which point the missile is already way off target. ;.;

  5. Just imagine if every KSP-Player chips in 1 Dollar, what could happen?

    Literally every KSP player in existence (not including pirates and devs) has chipped in 10-40 times that amount when they bought the game.

    For me KSP without the mods, i maybe would have played like 10-20h and never even set flag on the mun, and then forgot about this game, but i didnt thx to the all the awesome moders.

    Maybe we should be crowdfunding the awesome modders, instead.

  6. I wonder, will the bullets have different paths and trajectories? Even with the fireTransforms facing forward? If this is true you could fix your shotgun by putting a high inaccuracy parameter for your part. That way if the different projectiles are calculated the multiple projectiles would spread immensely and creates a shotgun effect. If BDArmory does not calculate different trajectories for your part then the bullets might just fly across in one cloud of metal.

    Each fireTransform calculates an 'inaccuracy value' independent of one another, so doing this would work to create a shotgun.

    What happens when you make multiple fireTransforms facing different directions anyway?

    If a gun has multiple fireTransforms, it appears BDArmory will select one of those fireTransforms as the 'reference'. All bullets will then fire in whatever direction the 'reference' fireTransform is pointed at.

    It selects the fireTransform based on however FindModelTransform works.

  7. Only when you are at either the ascending or descending node. But oh, you have no way of knowing where that might be, exept when you target the mun. ;)

    You know when you're at a node when the difference between the 90 degree heading line and the prograde indicator is at its maximum. Keep the ship pointed towards the prograde and the navball will give your heading to the nearest degree.

    A horribly inefficient way of determining inclination, but possible to the nearest degree.

  8. Eh, there isn't really a clearly defined line between "staging" and "not staging" anyway. Technically the act of burning fuel could be considered staging, because you're removing infinitely many infinitely small pieces of mass from the craft over a period of time. Alternatively the jettisoning of the empty fuel tanks could be considered a form of rocket propulsion, at least if you throw the tanks backwards instead of merely releasing them. All motion is relative anyway. Did the tanks move away from the spaceship, or did the spaceship move away from the tanks? Neither: it is your reference frame that is moving. The zen of physics. :D

    For a liquid oxygen + liquid hydrogen rocket, the smallest 'stage' would be one molecule of oxygen reacting to hydrogen. Something like: O2 + 2H2 > H2O.

    The Space Shuttle's external fuel tank hold's 630,000 kg of liquid oxygen. Liquid oxygen has a molar mass of ~32. So, the number of moles of oxygen is 630,000,000 grams / 32 = 19,687,500. Multiply by Avogradro's constant, 6.022 x 1023 x 19,687,500 = 1.1855812e+31 molecules of O2.

    Therefore, the Space Shuttle's external fuel tank isn't 1 stage, but 11,855,800,000,000,000,000,000,000,000,000 stages.

  9. At 200 metres, Bob Kerman (with helmet) has an angular size of 4.6 milliradians:

    Wif8avC.jpg

    This means Bob, with his helmet on, is around 0.92 metres tall.

    Without his helmet, he has an angular size of 4.1 milliradians, which equates to around 0.82 metres tall.

  10. In universe explanation:

    Barsan is a terrible haggler and that's why you were able to squeeze more funds out of them. Lezy and Virtrude are master hagglers and were able to negotiate a substantially lower price.

×
×
  • Create New...