Jump to content

Adding thrust to rover wheels?


owen102

Recommended Posts

Okay so in the later days of .21 i decided to start modifying parts to better suit my needs. One of these projects was attempting to add thrust to wheels so that the rover sticks to the ground. i started by copying the engine component from the standard ion engine to the config file of the rover wheels but that didnt seem to work even with infinite fuel and hacked gravity. i am wondering if i did something wrong or does the game code not allow adding thrust to wheels as im trying to do.

sorry for all the scrolling, these wheels have a big .cfg file

PART
{
name = roverWheel4
module = Part
author = Squad

mesh = model.mu
scale = 1

node_attach = 0.3093255, 0.322, 0.00, 1.0, 0.0, 0.0, 1
TechRequired = fieldScience
entryCost = 5200
cost = 450
category = Utility
subcategory = 0
title = RoveMax Model M4
manufacturer = Kerbal Motion LLC
description = After years of outcry against the lack of proper powered wheels, a small startup company named Kerbal Motion was founded and delivered just what the public wanted - the RoveMax Model 1 powered rover wheel. Now with a vectored ion thrust nozzle to keep your rover firmly planted on the ground!

attachRules = 0,1,0,1,0

mass = 0.09
dragModelType = default
maximum_drag = 0.6
minimum_drag = 0.4
angularDrag = 2
crashTolerance = 14
maxTemp = 3600
stagingIcon = LIQUID_ENGINE

crashTolerance = 100
breakingForce = 100
breakingTorque = 100

MODULE
{
name = ModuleEngines
thrustVectorTransformName = thrustTransform
exhaustDamage = False
ignitionThreshold = 0.1
minThrust = 0
maxThrust = 1000
heatProduction = 0
PROPELLANT
{
name = ElectricCharge
ratio = 1.0
}
PROPELLANT
{
name = XenonGas
ratio = 0.1
}
atmosphereCurve
{
key = 0 4200
}

}

MODULE
{
name = ModuleWheel
hasMotor = true
resourceName = ElectricCharge
resourceConsumptionRate = 2.0
canSteer = true
controlAxisType = Forward
steeringModeType = AutomaticSteer
brakeTorque = 300
brakeSpeed = 1.2
impactTolerance = 200
overSpeedDamage = 120
WHEEL
{
wheelName = wheel
wheelColliderName = wheelCollider
suspensionTransformName = suspensionTraverse
suspensionNeutralPointName = suspensionNeutralPoint
damagedObjectName = bustedwheel
rotateX = 0
rotateY = 1
rotateZ = 0
}

steeringCurve
{
key = 0 16
key = 10 9
key = 30 2
}

torqueCurve
{
key = 0 250 0 0
key = 80 100 0
key = 100 50 0 0
key = 120 0 0 0
}

}

MODULE
{
name = FXModuleLookAtConstraint
CONSTRAINLOOKFX
{
targetName = susp2-1
rotatorsName = susp2-2
}

CONSTRAINLOOKFX
{
targetName = susp2-2
rotatorsName = susp2-1
}

CONSTRAINLOOKFX
{
targetName = susp1-2
rotatorsName = susp1-1
}

CONSTRAINLOOKFX
{
targetName = susp1-1
rotatorsName = susp1-2
}

CONSTRAINLOOKFX
{
targetName = susp3-1
rotatorsName = susp3-2
}

CONSTRAINLOOKFX
{
targetName = susp3-2
rotatorsName = susp3-1
}

}

MODULE
{
name = FXModuleConstrainPosition
matchRotation = true
matchPosition = false
CONSTRAINFX
{
targetName = steering
moversName = trackSteering
}

}
}

Edited by Supernovy
Link to comment
Share on other sites

The engine needs a place to thrust from. The module is looking for an empty game object named thrustTransform (you can simply create a game object and give it this name, and rotate it so that the object's Z axis is pointing up. You need to use Unity to do this. You could also just try giving your wheel more mass, which can be done in the .cfg.

Link to comment
Share on other sites

Takes about 3 seconds to add thrustTransform in Unity. Should also mention that its Z+ that needs to point in direction of thrust, and it also needs to be OUTSIDE any colliders (that one got me good first engine i try to make lol).

Honestly with most KSP part the Unity build is the easyest part by a long shot...

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