Results 1 to 1 of 1

Thread: Mobile Vehicles

  1. #1
    MSgt. Shooter Person
    Join Date
    Dec 2007
    Location
    Staffordshire UK
    Posts
    277
    Gamer IDs

    Gamertag: Meat Bees

    Default Mobile Vehicles

    Hi Folks anyone had any joy with vehicles yet? I've tried to port a working vehicle from UDK to the Mobile UDK, I can get in it but it won't drive :/

    Is there something missing in the player controller in the mobile version that the pc one has?

    I've attached my code, its a cut up of the scorpion for the most part.

    Many thanks for any help and suggestions.

    Regards

    Greg

    Code:
    class UTVehicle_TheBiggerDrivingCar extends UDKVehicle;
    
    var DynamicLightEnvironmentComponent LightEnvironment;
    var bool bWasThrottle;
    var float ThrottleStartTime;
    var float	DefaultUprightTorqueFactor;
    var float	DefaultUprightMaxTorque;
    var float RocketSpeed;
    var() float LockSuspensionTravel;
    var() float LockSuspensionStiffness;
    
    
    //event bool DriverLeave (bool bForceLeave)
    //{
    //return false;
    //}
    
    defaultproperties
    {
    	Begin Object Class=DynamicLightEnvironmentComponent Name=MyLightEnvironment
    	bSynthesizeSHLight=true
    	bUseBooleanEnvironmentShadowing=FALSE
    	End Object
    	LightEnvironment=MyLightEnvironment
    	Components.Add(MyLightEnvironment)
    
    	Health=100
    	COMOffset=(x=-40.0,y=0.0,z=-36.0)
    	UprightLiftStrength=280.0
    	UprightTime=1.25
    	UprightTorqueStrength=500.0
    	bCanFlip=true
    	bSeparateTurretFocus=true
    	bHasHandbrake=true
    	MaxSpeed=1000
    	GroundSpeed=950
    	AirSpeed=11000
    	RocketSpeed=20000
    	ObjectiveGetOutDist=1500.0
    	HeavySuspensionShiftPercent=0.75f;
    
    Begin Object Class=UDKVehicleSimCar Name=SimObject
    		WheelSuspensionStiffness=100.0
    		WheelSuspensionDamping=3.0
    		WheelSuspensionBias=0.1
    		ChassisTorqueScale=0.0
    		MaxBrakeTorque=5.0
    		StopThreshold=100
    
    		MaxSteerAngleCurve=(Points=((InVal=0,OutVal=65),(InVal=800.0,OutVal=18.0),(InVal=1300.0,OutVal=13.0),(InVal=1600.0,OutVal=9.0),(InVal=1900.0,OutVal=1.0)))
    		SteerSpeed=210
    
    		LSDFactor=0.0
    		TorqueVSpeedCurve=(Points=((InVal=-1200.0,OutVal=0.0),(InVal=-600.0,OutVal=160.0),(InVal=0.0,OutVal=260.0),(InVal=1900.0,OutVal=520.0),(InVal=2100.0,OutVal=20.0),(InVal=2300.0,OutVal=0.0)))
    		EngineRPMCurve=(Points=((InVal=-1000.0,OutVal=5000.0),(InVal=0.0,OutVal=1000.0),(InVal=1098.0,OutVal=7000.0),(InVal=1100.0,OutVal=2000.0),(InVal=1698.0,OutVal=9000.0),(InVal=1700.0,OutVal=3000.0),(InVal=2200.0,OutVal=10000.0)))
    		EngineBrakeFactor=0.025
    		ThrottleSpeed=0.9
    		WheelInertia=0.1
    		NumWheelsForFullSteering=2
    		SteeringReductionFactor=0.0
    		SteeringReductionMinSpeed=1100.0
    		SteeringReductionSpeed=1400.0
    		bAutoHandbrake=true
    		bClampedFrictionModel=true
    		FrontalCollisionGripFactor=0.18
    		ConsoleHardTurnGripFactor=1.0
    		HardTurnMotorTorque=0.5
    
    		SpeedBasedTurnDamping=5.0
    		AirControlTurnTorque=40.0
    		InAirUprightMaxTorque=15.0
    		InAirUprightTorqueFactor=-30.0
    
    		// Longitudinal tire model based on 10% slip ratio peak
    		WheelLongExtremumSlip=0.1
    		WheelLongExtremumValue=0.3
    		WheelLongAsymptoteSlip=0.8
    		WheelLongAsymptoteValue=0.4
    
    		// Lateral tire model based on slip angle (radians)
       		WheelLatExtremumSlip=0.2     // 20 degrees
    		WheelLatExtremumValue=0.6
    		WheelLatAsymptoteSlip=0.4     // 80 degrees
    		WheelLatAsymptoteValue=0.5
    
    		bAutoDrive=false
    		AutoDriveSteer=0.3
    	End Object
    	Components.Add(SimObject)
    
    	Begin Object Class=DrivingWheel Name=RRWheel
    		BoneName="B_R_Tire"
    		Side=SIDE_Right
    		BoneOffset=(X=0.0,Y=20.0,Z=0.0)
    		SkelControlName="B_R_Tire_Cont"
    	End Object
    	Wheels(0)=RRWheel
    
    	Begin Object Class=DrivingWheel Name=LRWheel
    		BoneName="B_L_Tire"
    		Side=SIDE_Left
    		SkelControlName="B_L_Tire_Cont"
    	End Object
    	Wheels(1)=LRWheel
    
    	Begin Object Class=DrivingWheel Name=RMWheel
    		BoneName="M_R_Tire"
    		Side=SIDE_Right
    		SkelControlName="M_R_Tire_Cont"
                    Name="RMWheel"
    	End Object
    	Wheels(2)=RMWheel
    
    	Begin Object Class=DrivingWheel Name=LMWheel
    		BoneName="M_L_Tire"
                    Side=SIDE_Left
    		SkelControlName="M_L_Tire_Cont"
                    Name="LMWheel"
    	End Object
    	Wheels(3)=LMWheel
    
    	Begin Object Class=DrivingWheel Name=RFWheel
    		BoneName="F_R_Tire"
    		BoneOffset=(X=0.0,Y=20.0,Z=0.0)
    		Side=SIDE_Right
    		SkelControlName="F_R_Tire_Cont"
    	End Object
    	Wheels(4)=RFWheel
    
    	Begin Object Class=DrivingWheel Name=LFWheel
    		BoneName="F_L_Tire"
    		BoneOffset=(X=0.0,Y=-20.0,Z=0.0)
    		Side=SIDE_Left
    		SkelControlName="F_L_Tire_Cont"
    	End Object
    	Wheels(5)=LFWheel
    
    	lockSuspensionTravel=37;
    	lockSuspensionStiffness=62.5;
    	BaseEyeheight=30
    	Eyeheight=30
    	MomentumMult=0.5
    	NonPreferredVehiclePathMultiplier=1.5
    
    	//Begin Object Name=CollisionCylinder
    	//	CollisionHeight=+65.0
    	//	CollisionRadius=+140.0
    	//	Translation=(Z=0.0)
    	//End Object
    
    	Begin Object Name=SVehicleMesh
    		SkeletalMesh=SkeletalMesh'VH_TheCar.Wagon'
    		AnimTreeTemplate=AnimTree'VH_TheCar.TheBiggerCar_AnimTree'
    		PhysicsAsset=PhysicsAsset'VH_TheCar.Wagon_Physics'
    		RBCollideWithChannels=(Default=TRUE,GameplayPhysics=TRUE,EffectPhysics=TRUE,Vehicle=TRUE,Untitled4=TRUE)
    		LightEnvironment=MyLightEnvironment
    	End Object
    
    	DrawScale=1
    	Seats(0)={(	
    				
    		CameraTag=DriverViewSocket,
    		CameraOffset=-300,
    		CameraBaseOffset=(X=-50.0,Z=20.0),
    		SeatIconPos=(X=0.44,Y=0.48),
    		DriverDamageMult=0.0,
    		)}
    }
    class DrivingWheel extends UDKVehicleWheel;

    defaultproperties
    {
    WheelRadius=35
    SuspensionTravel=40
    bPoweredWheel=true
    SteerFactor=0.0
    LongSlipFactor=2.0
    LatSlipFactor=2.75
    HandbrakeLongSlipFactor=0.7
    HandbrakeLatSlipFactor=0.3
    ParkedSlipFactor=10.0
    bUseMaterialSpecificEffects=true
    }
    Last edited by Showster; 12-20-2010 at 05:50 AM.


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.