Home Unreal Engine

UDK crashing after importing new vehicle

polycounter lvl 8
Offline / Send Message
gannonroader polycounter lvl 8
I'm guessing it has something to do with my script, but i'm not a programmer. I edited a script from a youtube tutorial, and had to accomadate the fact that my vehicle has 8 wheels, so some changes were necessary. I don't get any errors, or warnings, it just crashes upon hitting play. I don't even have an idea where to begin to look, and i'm on a pretty tight deadline (school) to get it figured out. Help?



// lets exend SVehicle and make our own custom vehicle class

class LAVIII extends SVehicle;

var() name CameraTag; //declare variable for camera attach point

//code section for camera
simulated function bool CalcCamera( float fDeltaTime, out vector out_CamLoc, out rotator out_CamRot, out float out_FOV )
{
local vector SocketLoc;
local rotator SocketRot;
local rotator Rot;

//get the location and rotation of the socket
Mesh.GetSocketWorldLocationAndRotation(CameraTag, SocketLoc, SocketRot);

// combine orientaton of socket with the mouse orientation
Rot.Yaw = SocketRot.Yaw + Controller.Rotation.Yaw;
Rot.Roll = SocketRot.Roll;
Rot.Pitch = SocketRot.Pitch + Controller.Rotation.Pitch;

// output transforms
out_CamLoc = SocketLoc;
out_CamRot = Rot;

return true;
}

defaultproperties
{
CameraTag=Camera // assign the socket to the camera code
COMOffset=(x=0.0,y=-10.0,z=-36.0) // center of gravity offset from root_bone local

// parameters for player to flip vehicle
UprightLiftStrength=280.0
UprightTime=1.25
UprightTorqueStrength=500.0
bCanFlip=true

bHasHandbrake=true
GroundSpeed=1500 // max speed on ground
AirSpeed=1700 // max speed in air
HeavySuspensionShiftPercent=0.75f;

// define the vehicle simulation
Begin Object Class=UDKVehicleSimCar Name=SimObject

WheelSuspensionStiffness=80.0 //how soft the suspension is
WheelSuspensionDamping=3.0
WheelSuspensionBias=0.1
ChassisTorqueScale=0.0
MaxBrakeTorque=5.0
StopThreshold=100

MaxSteerAngleCurve=(Points=((InVal=0,OutVal=45),(InVal=600.0,OutVal=15.0),(InVal=1100.0,OutVal=10.0),(InVal=1300.0,OutVal=6.0),(InVal=1600.0,OutVal=1.0)))
SteerSpeed=110

LSDFactor=0.0

// The follow two parameters set the gear rangers (in rpm) and the torque produced per range
TorqueVSpeedCurve=(Points=((InVal=-600.0,OutVal=0.0),(InVal=-300.0,OutVal=80.0),(InVal=0.0,OutVal=130.0),(InVal=950.0,OutVal=130.0),(InVal=1050.0,OutVal=10.0),(InVal=1150.0,OutVal=0.0)))
EngineRPMCurve=(Points=((InVal=-500.0,OutVal=2500.0),(InVal=0.0,OutVal=500.0),(InVal=549.0,OutVal=3500.0),(InVal=550.0,OutVal=1000.0),(InVal=849.0,OutVal=4500.0),(InVal=850.0,OutVal=1500.0),(InVal=1100.0,OutVal=5000.0)))

EngineBrakeFactor=0.025
ThrottleSpeed=0.2
WheelInertia=0.2
NumWheelsForFullSteering=4
SteeringReductionFactor=0.0
SteeringReductionMinSpeed=1100.0
SteeringReductionSpeed=1400.0
bAutoHandbrake=true
bClampedFrictionModel=true
FrontalCollisionGripFactor=0.18
ConsoleHardTurnGripFactor=1.0
HardTurnMotorTorque=0.7

SpeedBasedTurnDamping=20.0
AirControlTurnTorque=40.0
InAirUprightMaxTorque=15.0
InAirUprightTorqueFactor=-30.0

// Longitudinal tire model based on 10% slip ratio peak
WheelLongAsymptoteSlip=2.0
WheelLongAsymptoteValue=0.6

// Lateral tire model based on slip angle (radians)
WheelLatExtremumSlip=0.35 // 20 degrees
WheelLatExtremumValue=0.9
WheelLatAsymptoteSlip=1.4 // 80 degrees
WheelLatAsymptoteValue=0.9

bAutoDrive=false
AutoDriveSteer=0.3
End Object

SimObj=SimObject
Components.Add(SimObject)

// define the vehicle mesh, animation tree, and physics asset
Begin Object Name=SVehicleMesh
SkeletalMesh=SkeletalMesh'LAVIII.LAVIIIRIG'
AnimTreeTemplate=AnimTree'LAVIII.AT_LAVIII'
PhysicsAsset=PhysicsAsset'LAVIII.LAVIIIRIG_Physics'
End Object

// define all the wheels
Begin Object Class=SVehicleWheel Name=FRWheel
BoneName="F_R_Tire"
SkelControlName="F_R_Tire_CTRL"
WheelRadius=22
SteerFactor=1.0
LongSlipFactor=2.0
LatSlipFactor=3.0
HandbrakeLongSlipFactor=0.8
HandbrakeLatSlipFactor=0.8
End Object
Wheels(0)=FRWheel

Begin Object Class=SVehicleWheel Name=FFRWheel
BoneName="FF_R_Tire"
SkelControlName="FF_R_Tire_CTRL"
WheelRadius=22
SteerFactor=1.0
LongSlipFactor=2.0
LatSlipFactor=3.0
HandbrakeLongSlipFactor=0.8
HandbrakeLatSlipFactor=0.8
End Object
Wheels(0)=FRWheel

Begin Object Class=SVehicleWheel Name=FLWheel
BoneName="F_L_Tire"
SkelControlName="F_L_Tire_CTRL"
WheelRadius=22
SteerFactor=1.0
LongSlipFactor=2.0
LatSlipFactor=3.0
HandbrakeLongSlipFactor=0.8
HandbrakeLatSlipFactor=0.8
End Object
Wheels(1)=FLWheel

Begin Object Class=SVehicleWheel Name=FFLWheel
BoneName="FF_L_Tire"
SkelControlName="FF_L_Tire_CTRL"
WheelRadius=22
SteerFactor=1.0
LongSlipFactor=2.0
LatSlipFactor=3.0
HandbrakeLongSlipFactor=0.8
HandbrakeLatSlipFactor=0.8
End Object
Wheels(1)=FLWheel

Begin Object Class=SVehicleWheel Name=RRWheel
BoneName="B_R_Tire"
SkelControlName="R_R_Tire_CTRL"
WheelRadius=22
bPoweredWheel=true
End Object
Wheels(2)=RRWheel

Begin Object Class=SVehicleWheel Name=RRRWheel
BoneName="RR_R_Tire"
SkelControlName="RR_R_Tire_CTRL"
WheelRadius=22
bPoweredWheel=true
End Object
Wheels(2)=RRWheel

Begin Object Class=SVehicleWheel Name=RLWheel
BoneName="B_L_Tire"
SkelControlName="R_L_Tire_CTRL"
WheelRadius=22
bPoweredWheel=true
End Object
Wheels(3)=RLWheel

Begin Object Class=SVehicleWheel Name=RRLWheel
BoneName="RR_L_Tire"
SkelControlName="R_L_Tire_CTRL"
WheelRadius=22
bPoweredWheel=true
End Object
Wheels(3)=RLWheel

}

Replies

Sign In or Register to comment.