Page 1 of 2 12 LastLast
Results 1 to 40 of 45
  1. #1
    God King
    Join Date
    Feb 2010
    Location
    Tegleg Records
    Posts
    4,399
    Gamer IDs

    Gamertag: tegleg digital

    Default Inside the Scorpion - Scripting your own vehicles

    hello

    This is a ruff insight to the script side of making a vehicle.

    Lorenz si Ŕ gentilmente offerto di tradurre questo tutorial in italiano!
    Lorenz is kindly translating this into italian find it here

    To try and keep the document length down here we will use UTVehicle_Scorpion as a 'template' for our own car.
    The same can be done with Cicada and Manta for flying and hovering vehicles.
    Epics vehicle pages are here.
    http://udn.epicgames.com/Three/SettingUpVehicles.html
    http://udn.epicgames.com/Three/Vehic...icalGuide.html
    this ones for mobile cars including a downloadable example.
    http://udn.epicgames.com/Three/Mobil...leExample.html

    im going to try and write here as complete a guide as a can be bothered with,
    i was going to do it more advanced than this but its already a monster post.
    get ready here it comes

    Step 1. The script files. (Below)
    Step 2. Modify your cars appearance.
    Step 3. Modify your cars performance.
    Common problems and solutions.

    Before you start!

    if you havnt already got your own project folder make one now. if you have, skip to Step 1.
    more info on starting your own script project can be found here. http://udn.epicgames.com/Three/Devel...ptProject.html

    navigate to UDK/Development/Src/
    make a new folder, call it what you want but here ill call it 'TegIsAce'.
    make another new folder inside that and call it 'Classes'
    now you have something like this
    UDK/Development/Src/TegIsAce/Classes
    this is where all your custom script files will live.

    to make the engine know about your project we need to tell it.
    open UDK/UDKGame/Config
    find DefaultEngine.ini and double click to open it.

    find this bit
    Code:
    [UnrealEd.EditorEngine]
    +EditPackages=UTGame
    +EditPackages=UTGameContent
    add the name of your new script folder here like this
    Code:
    [UnrealEd.EditorEngine]
    +EditPackages=UTGame
    +EditPackages=UTGameContent
    +EditPackages=TegIsAce
    if you try and start udk now it will moan at you because the script folder is empty. so lets get adding stuff.

    Step 1.

    we will start by making a copy of the scorpoin script files.

    look inside
    UDK/Development/Src/UTGame/Classes
    UDK/Development/Src/UTGameContent/Classes
    and copy these files

    UTVehicle_Scorpion
    UTVehicleScorpionWheel
    UTVehicle_Scorpion_Content
    UTVehicleFactory_Scorpion

    into your folder ie UDK/Development/Src/TegIsAce/Classes

    Rename all the files like this

    UTVehicle_MyCar
    UTVehicleMyCarWheel
    UTVehicle_MyCar_Content
    UTVehicleFactory_MyCar

    now you need to open them up and rename the class to match the file name. use any text editor (not word) like WotGreal or Context

    open the file you called UTVehicle_MyCar.uc
    the first line of code declares the class name and the class it extends from.
    it will look like this.
    Code:
    class UTVehicle_Scorpion extends UTVehicle
    change it to the same as the file name like this.
    Code:
    class UTVehicle_MyCar extends UTVehicle
    do the same with the others

    class UTVehicleScorpionWheel extends UDKVehicleWheel;
    to
    class UTVehicleMyCarWheel extends UDKVehicleWheel;

    class UTVehicle_Scorpion_Content extends UTVehicle_Scorpion;
    to
    class UTVehicle_MyCar_Content extends UTVehicle_MyCar;
    *notice this one extends UTVehicle_MyCar;

    class UTVehicleFactory_Scorpion extends UTVehicleFactory;
    to
    class UTVehicleFactory_MyCar extends UTVehicleFactory;
    keep this file open and look to almost the last line of code.

    Code:
    VehicleClassPath="UTGameContent.UTVehicle_Scorpion_Content"
    this needs to be changed to your folder . your car content.
    Code:
    VehicleClassPath="TegIsAce.UTVehicle_MyCar_Content"
    Save Everything Often!

    you now have your own independant version of the scorpion!
    go ahead and recompile the scripts and have a drive around in it. it is an exact copy of the scorpion so nothing too exciting yet.

    in the next parts we will have a look at spicing things up a bit
    Last edited by tegleg; 04-09-2012 at 10:15 AM.
    Code:
    We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
    LOOK>> Please ask questions in the forum, NOT a private message <<LOOK
    tegleg.co.uk
    My Tutorials n Stuff
    Games: NEW! Tegs Playground Multiplayer Edition
    Unwheel2 - VCTF Game - Sponic Mesh 3D
    Shh.. dont tell anyone about my android apps.
    will code for money

  2. #2
    God King
    Join Date
    Feb 2010
    Location
    Tegleg Records
    Posts
    4,399
    Gamer IDs

    Gamertag: tegleg digital

    Default

    Step 2.

    Modify your cars appearance.
    if you dont have your own car skelital mesh ready skip this step and watch Geodavs tutorials.

    we need to specify the skelital mesh, physics asset, morph targets and animations that will be used in your car.
    open up UTVehicle_MyCar_Content and find this block of code.
    Code:
    Begin Object Name=SVehicleMesh
    		SkeletalMesh=SkeletalMesh'VH_Scorpion.Mesh.SK_VH_Scorpion_001'
    		AnimTreeTemplate=AnimTree'VH_Scorpion.Anims.AT_VH_Scorpion_001'
    		PhysicsAsset=PhysicsAsset'VH_Scorpion.Mesh.SK_VH_Scorpion_001_Physics'
    		MorphSets[0]=MorphTargetSet'VH_Scorpion.Mesh.VH_Scorpion_MorphTargets'
    		AnimSets.Add(AnimSet'VH_Scorpion.Anims.K_VH_Scorpion')
    		RBCollideWithChannels=(Default=TRUE,BlockingVolume=TRUE,GameplayPhysics=TRUE,EffectPhysics=TRUE,Vehicle=TRUE,Untitled4=TRUE)
    	End Object
    for the purpose of this tutorial i will just change the mesh and physics asset like this, you might have your own anims and morph targets too.
    Code:
    Begin Object Name=SVehicleMesh
    		SkeletalMesh=SkeletalMesh'MyCar_Package.MyCar_Mesh'
    		AnimTreeTemplate=AnimTree'VH_Scorpion.Anims.AT_VH_Scorpion_001'
    		PhysicsAsset=PhysicsAssetMyCar_Package.MyCar_Physics'
    		MorphSets[0]=MorphTargetSet'VH_Scorpion.Mesh.VH_Scorpion_MorphTargets'
    		AnimSets.Add(AnimSet'VH_Scorpion.Anims.K_VH_Scorpion')
    		RBCollideWithChannels=(Default=TRUE,BlockingVolume=TRUE,GameplayPhysics=TRUE,EffectPhysics=TRUE,Vehicle=TRUE,Untitled4=TRUE)
    	End Object
    the skelital mesh is also referenced inside your vehicle factory.
    a vehicle factory is kind of a vehicle spawner and is not altogether neccesary as we will see later when we tune our car.
    open UTVehicleFactory_MyCar and change the mesh.

    SkeletalMesh=SkeletalMesh'VH_Scorpion.Mesh.SK_VH_S corpion_001'
    to
    SkeletalMesh=SkeletalMesh'MyCar_Package.MyCar_Mesh '

    Changing the Wheels.
    you need to reference your new wheel class in your new car. not the wheel you visually see in the game (thats your model) but the physical representation of the wheels in the game engine (udk).
    open up UTVehicle_Mycar and scroll right down almost to the end to find the wheel objects.
    Code:
    Begin Object Class=UTVehicleScorpionWheel Name=RRWheel
    		BoneName="B_R_Tire"
    		BoneOffset=(X=0.0,Y=20.0,Z=0.0)
    		SkelControlName="B_R_Tire_Cont"
    	End Object
    	Wheels(0)=RRWheel
    
    	Begin Object Class=UTVehicleScorpionWheel Name=LRWheel
    		BoneName="B_L_Tire"
    		BoneOffset=(X=0.0,Y=-20.0,Z=0.0)
    		SkelControlName="B_L_Tire_Cont"
    	End Object
    	Wheels(1)=LRWheel
    
    	Begin Object Class=UTVehicleScorpionWheel Name=RFWheel
    		BoneName="F_R_Tire"
    		BoneOffset=(X=0.0,Y=20.0,Z=0.0)
    		SteerFactor=1.0
    		LongSlipFactor=2.0
    		LatSlipFactor=3.0
    		HandbrakeLongSlipFactor=0.8
    		HandbrakeLatSlipFactor=0.8
    		SkelControlName="F_R_Tire_Cont"
    	End Object
    	Wheels(2)=RFWheel
    
    	Begin Object Class=UTVehicleScorpionWheel Name=LFWheel
    		BoneName="F_L_Tire"
    		BoneOffset=(X=0.0,Y=-20.0,Z=0.0)
    		SteerFactor=1.0
    		LongSlipFactor=2.0
    		LatSlipFactor=3.0
    		HandbrakeLongSlipFactor=0.8
    		HandbrakeLatSlipFactor=0.8
    		SkelControlName="F_L_Tire_Cont"
    	End Object
    	Wheels(3)=LFWheel
    change the Object Class in all 4 wheel objects to your new wheel.
    Code:
    Begin Object Class=UTVehicleMyCarWheel Name=RRWheel
    		BoneName="B_R_Tire"
    		BoneOffset=(X=0.0,Y=20.0,Z=0.0)
    		SkelControlName="B_R_Tire_Cont"
    	End Object
    	Wheels(0)=RRWheel
    ...
    a little extra i always add (dont know if it really makes any difference) is the side of the wheels. Side=SIDE_Right or Side=SIDE_Left.
    add this to all 4 of your wheel objects like this.
    Code:
    Begin Object Class=UTVehicleMyCarWheel Name=RRWheel
    		BoneName="B_R_Tire"
    		BoneOffset=(X=0.0,Y=20.0,Z=0.0)
    		SkelControlName="B_R_Tire_Cont"
                    Side=SIDE_Right
    	End Object
    	Wheels(0)=RRWheel
    
    	Begin Object Class=UTVehicleMyCarWheel Name=LRWheel
    		BoneName="B_L_Tire"
    		BoneOffset=(X=0.0,Y=-20.0,Z=0.0)
    		SkelControlName="B_L_Tire_Cont"
    Side=SIDE_Left
    	End Object
    	Wheels(1)=LRWheel
    ....
    We will sort out the wheel radius when we tune our car next.
    Last edited by tegleg; 10-30-2011 at 10:42 AM.
    Code:
    We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
    LOOK>> Please ask questions in the forum, NOT a private message <<LOOK
    tegleg.co.uk
    My Tutorials n Stuff
    Games: NEW! Tegs Playground Multiplayer Edition
    Unwheel2 - VCTF Game - Sponic Mesh 3D
    Shh.. dont tell anyone about my android apps.
    will code for money

  3. #3
    God King
    Join Date
    Feb 2010
    Location
    Tegleg Records
    Posts
    4,399
    Gamer IDs

    Gamertag: tegleg digital

    Default

    Step 3.

    Modify your cars performance.

    **
    A bit about the physics, bear this in mind when you are tuting your car.
    as i suspected the wheels play no part in the physics of the car, instead they are merely a visual representation and forces are applied to the car chassis directly.
    http://http://udn.epicgames.com/Thre...led%20Vehicles
    Wheeled vehicles in Unreal Engine 3 are simulated as a single rigid body. Ray-casts are made from points on the car chassis downwards to see where they hit the ground, and forces are computed at the contact point based on a number of parameters. There are no physical `wheel' objects - the engine just stores how fast each wheel is moving, and uses that in the calculations for forces generated.
    **

    for this step we will make the vehicle 'placeable' so we can play with the cars settings in the editor.

    open UTVehicle_MyCar_Content and add the word placeable like this.
    Code:
    class UTVehicle_MyCar_Content extends UTVehicle_MyCar
    placeable;
    to make your cars physics alive at level start you need to add this line in the PostBeginPlay() function in UTVehicle_MyCar.
    Mesh.WakeRigidBody();
    Code:
    simulated event PostBeginPlay()
    {
       blah stuff here
    ...
        Mesh.WakeRigidBody();
    }
    compile the script and open the editor.
    open the Actor Browser and go down to vehicles. you will now see UTVehicle_MyCar_Content as well as UTVehicleFactory_MyCar.
    drag UTVehicle_MyCar_Content onto your map and double click (or f4) to open its properties.
    here we can change almost every variable involved in the handling of your car. it will not save the changes into your script but serves as a testing platform.

    Wheel Radius.

    the chances are that your car wheels are not the same size as the scorpions, so we will sort that out now.
    with the car properties open in the editor, click on SVehicle and you will see 'Wheels'.
    click the arrow to the left of it to open it further. you will see 0, 1, 2, 3 each with an arrow, these are your 4 wheels.
    open 0, then SVehicle Wheel and you will see all sorts including 'Wheel Radius'.
    change the number on all the wheel objects to make them bigger or smaller so that your car wheels look as if they are on the ground, not floating in the air or sunk into the ground.

    Wheel Slip.
    whilst you have the wheel object properties open lets have a play with the tyre grip. look for Long Slip Factor and Lat Slip Factor.
    Long Slip is forwards grip and Lat Slip is sideways.
    depending on the speed, size and shape of your vehicle this can be anywhere from around 1.0 to 3.0. 1.5 is a good starting point.

    Lat and Long slip scale the slip curve defined in the SimObject, this is where your 'real' grip is defined.
    ie this bit
    Code:
    // Longitudinal tire model based on 10% slip ratio peak
            WheelLongExtremumSlip=0.3
            WheelLongExtremumValue=1.0
            WheelLongAsymptoteSlip=1.0
            WheelLongAsymptoteValue=0.9
    
            // Lateral tire model based on slip angle (radians)
            WheelLatExtremumSlip=0.8     // 20 degrees
            WheelLatExtremumValue=0.9
            WheelLatAsymptoteSlip=0.5    // 80 degrees
            WheelLatAsymptoteValue=1.5
    *note you will probably have to change these values again when we speed the car up.

    once you find the correct wheel radius and good slip factors you can put it in your wheel script. open UTVehicleMyCarWheel and change it there to make it permanent.
    Code:
    class UTVehicleMyCarWheel extends UDKVehicleWheel;
    
    defaultproperties
    {
    	WheelRadius=27
    ...
    LongSlipFactor=2.0
    	LatSlipFactor=2.75
    Speed.
    the main thing holding back the scorpions top speed is a limit that has been set on the physics called 'MaxSpeed'. lets bump that up now.
    open UTVehicle_MyCar and add this line in the DefaultProperties block, put it at the end so you can find it again easily.
    DefaultProperties contains all the goodies we will mess with.
    Code:
    defaultproperties
    {
    blah blah lots of stuff here
    ..
    MaxSpeed=8500
    }
    Gearbox.
    keep UTVehicle_MyCar open.
    the gearbox is defined as an array called TorqueVSpeedCurve.
    you will find it in DefaultProperties inside the SimObject. its full of numbers that need to be changed but ill write words to show you whats going on.
    Code:
    TorqueVSpeedCurve=(Points=((Reverse),(First Gear),(Second),(Third),(Fourth),(Fifth)))
    here is TorqueVSpeedCurve from one of my cars to get you started. not super fast but definately not slow.
    Code:
    TorqueVSpeedCurve=(Points=((InVal=-590.0,OutVal=0.0),(InVal=-100.0,OutVal=28.0),(InVal=0.0,OutVal=55.0),(InVal=450.0,OutVal=60.0),(InVal=6050.0,OutVal=10.0),(InVal=9150.0,OutVal=0.0)))
    you can mess around with these values in the editor.
    in the car properties go down to SVehicle - Sim Obj - UDKVehicle Sim Car
    open TorqueVSpeedCurve - Points
    these are your gears, Inval is speed, OutVal is torque.

    Other Stuff.
    here are some things you might like to change. they can all be found in the Sim Object.

    the scorpion grinds to an abrupt halt as soon as you stop accelerating. to make it more realistic so the car free wheels change this.
    EngineBrakeFactor=0.005

    to give the brakes a more realistic force change this.
    MaxBrakeTorque=25.0

    now that your car goes really fast you will notice you cannot steer at high speeds. change the values in MaxSteerAngleCurve.
    this works for my cars
    Code:
    MaxSteerAngleCurve=(Points=((InVal=0,OutVal=25),(InVal=600.0,OutVal=20.0),(InVal=3100.0,OutVal=16.0),(InVal=4400.0,OutVal=12.0),(InVal=5000.0,OutVal=9.0)))
    also for a quick fix change this.
    MinHardTurnSpeed=99999.0

    to make the vehicle able to hold a drift change this.
    WheelLatAsymptoteSlip=8.4

    these are the most usefull things to change but you now have the freedom to play with almost any setting in the editor.

    by now you should have your own car that goes fast and drifts well
    if not please have a look at the next post.
    Last edited by tegleg; 01-05-2013 at 07:42 AM.
    Code:
    We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
    LOOK>> Please ask questions in the forum, NOT a private message <<LOOK
    tegleg.co.uk
    My Tutorials n Stuff
    Games: NEW! Tegs Playground Multiplayer Edition
    Unwheel2 - VCTF Game - Sponic Mesh 3D
    Shh.. dont tell anyone about my android apps.
    will code for money

  4. #4
    God King
    Join Date
    Feb 2010
    Location
    Tegleg Records
    Posts
    4,399
    Gamer IDs

    Gamertag: tegleg digital

    Default

    Common problems and solutions.

    Compile Errors.

    if you get an error warning when you compile READ WHAT IT SAYS. it will give you the class and the line number of the offending error.
    the most frequent error is caused by typos or stray spaces so double check. missing the ';' from the end of a line is another.

    My car doesnt show up in the game.
    make sure the VehicleClassPath is correct in your vehicle factory.
    Code:
    VehicleClassPath="TegIsAce.UTVehicle_MyCar_Content"
    if this doesnt fix it open the unreal FrontEnd and do a script full recompile.

    Wheels spin but no movement / too far up into the body.
    this is usualy a problem in your model. move the wheels down a bit in your 3d modeling prog and re-import.
    another thing that can affect this is WheelSuspensionStiffness in the Sim Oject.
    change WheelSuspensionDamping for 'bouncy' susspension issues.

    My car uses the scorpion materials.
    the scorpion materials are set in the UTVehicle_MyCar_Content. change these to your materials
    Code:
    SpawnMaterialLists[0]=(Materials=(MaterialInterface'VH_Scorpion.Materials.MI_VH_Scorpion_Spawn_Red'))
    	SpawnMaterialLists[1]=(Materials=(MaterialInterface'VH_Scorpion.Materials.MI_VH_Scorpion_Spawn_Blue'))
    
    	TeamMaterials[0]=MaterialInstanceConstant'VH_Scorpion.Materials.MI_VH_Scorpion_Red'
    	TeamMaterials[1]=MaterialInstanceConstant'VH_Scorpion.Materials.MI_VH_Scorpion_Blue'
    My car is the wrong scale.
    change the scale in your modeling prog or in UTVehicle_MyCar_Content.
    DrawScale=1.2

    My car just wheelies.
    another thing that can be fixed in your modeling prog.
    the Main_Root bone needs to be in the exact centre and on the floor of your car.
    the centre of mass can also be changed in UTVehicle_MyCar.
    COMOffset=(x=-40.0,y=0.0,z=-36.0)

    My car points the wrong way / on its side.
    a modeling problem. re-orientate the model and re-import.

    Camera blah...
    http://forums.epicgames.com/showthread.php?t=800741

    My Vehicle only 'falls' to the ground when the player takes control of it
    with UTVehicles the factory initialises the physics.
    if you dont use a factory and place the vehicle instead put this in postbeginplay()
    Code:
    Mesh.WakeRigidBody();
    Wheels Dont Turn
    either:
    animtree not set up properly, take a look at the scorpion's
    wheels not skinned properly, re-skin in the modeling app and re-import

    Let me know if you have a different problem, cant think of any more atm.
    Last edited by tegleg; 06-10-2013 at 06:10 AM.
    Code:
    We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
    LOOK>> Please ask questions in the forum, NOT a private message <<LOOK
    tegleg.co.uk
    My Tutorials n Stuff
    Games: NEW! Tegs Playground Multiplayer Edition
    Unwheel2 - VCTF Game - Sponic Mesh 3D
    Shh.. dont tell anyone about my android apps.
    will code for money

  5. #5
    Prisoner 849
    Join Date
    Aug 2010
    Location
    stoke.u.k
    Posts
    911
    Gamer IDs

    Gamertag: gaz661

    Default

    as my bike is using the scorpion code i guess this is the best place to ask for advice on the one remaining problem.its quite a fundemental one,but one i thought would be quite easy to fix.



    as you can see,the bike leans the wrong way.obviously its using car suspension so will act like a car.my plan was to reverse the physics on the roll axis.
    the bike is inherently unstable so im using bstayupright=ture and StayUprightRollResistAngle.this is set to 5 in the video till i get it sorted but works well up to a lean angle of 22.and StayUprightPitchResistAngle=25.0 to stop it flipping on wheelies.
    setting the StayUprightRollResistAngle to a negative number didnt work,this is how i achieved a bike sim in max.i went through all the code and didnt find anything that seemed to relate to the problem untill i got all the way to SVehicle.uc where there is the line InertiaTensorMultiplier=(x=1.0,y=1.0,z=1.0) which looked promising but had really bad side effects when using a negative number.

    is it possible to reverse the physics or should i look into faking it in the animtree by rotating the root when the bike is turning?

    thanks.

  6. #6
    Prisoner 849
    Join Date
    Jun 2008
    Posts
    892
    Gamer IDs

    Gamertag: Black Fang666

    Default

    I would go ahead and try the doing it in anim tree, since you will need to do more stuff like it later, like the handlebars turning.
    Last edited by skwisdemon666; 03-12-2012 at 07:37 AM.
    Want to collaborate? Want to chat UDK? Message me on Skype, Craig Delancy. Check out my UDK Youtube channel: http://www.youtube.com/user/xblBlack...ew=0&flow=grid

  7. #7
    God King
    Join Date
    Feb 2010
    Location
    Tegleg Records
    Posts
    4,399
    Gamer IDs

    Gamertag: tegleg digital

    Default

    yes do the handlebars in the animtree

    for leaning change the Z offset in centre of mass
    COMOffset=(x=0.0,y=0.0,z=0.0)

    like
    COMOffset=(x=0.0,y=0.0,z=-10.0)
    or something
    Code:
    We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
    LOOK>> Please ask questions in the forum, NOT a private message <<LOOK
    tegleg.co.uk
    My Tutorials n Stuff
    Games: NEW! Tegs Playground Multiplayer Edition
    Unwheel2 - VCTF Game - Sponic Mesh 3D
    Shh.. dont tell anyone about my android apps.
    will code for money

  8. #8
    Prisoner 849
    Join Date
    Aug 2010
    Location
    stoke.u.k
    Posts
    911
    Gamer IDs

    Gamertag: gaz661

    Default

    nice one tegleg,was beginning to think youd left the planet or something.i new it would be something simple that i had overlooked.

    already had it set at -5,ive now canged it to -45.its working great.just need to mess with the uprighttime and lift strengh to get it a little less wobbly.
    Last edited by gaz661; 03-12-2012 at 04:01 PM.

  9. #9
    MSgt. Shooter Person
    Join Date
    Dec 2007
    Location
    Staffordshire UK
    Posts
    290
    Gamer IDs

    Gamertag: Meat Bees

    Default

    Hey Gaz661

    Would you mind sharing what your rig looks like for your bike i.e. did you rig just 2 wheels or did you put 4 in there? I've seen multiple solutions for bikes but yours looks to be pretty good!

    Also Tegleg killer write up nice one

    All the best

    Greg

  10. #10
    Prisoner 849
    Join Date
    Aug 2010
    Location
    stoke.u.k
    Posts
    911
    Gamer IDs

    Gamertag: gaz661

    Default

    the bike has four wheels.the front and back left wheels are centred to the root,and are the ones used to drive the bike.the front and rear right wheels are offset just a little.there are three zxrwheel.uc files.one to drive the rear left,one to turn the front left and the third sets the wheel radius of the right wheels to 2 so that they dont make contact.i will post the max file this evening for you to check out.

    Last edited by gaz661; 03-14-2012 at 06:32 AM.

  11. #11
    Iron Guard
    Join Date
    Nov 2009
    Location
    CA
    Posts
    567

    Default

    Hey Tegleg,

    What causes the Scorpion to have physics before the player enters it? Such as placing a Scorpion vehicle up in the air, in the editor, when you start playing, it'll fall. Using SVehicle only 'falls' to the ground when the player takes control of it.

    Thanks.

  12. #12
    God King
    Join Date
    Feb 2010
    Location
    Tegleg Records
    Posts
    4,399
    Gamer IDs

    Gamertag: tegleg digital

    Default

    the factory initialises the physics.
    if you dont use a factory and place the vehicle instead put this in postbeginplay()
    Mesh.WakeRigidBody();
    Code:
    We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
    LOOK>> Please ask questions in the forum, NOT a private message <<LOOK
    tegleg.co.uk
    My Tutorials n Stuff
    Games: NEW! Tegs Playground Multiplayer Edition
    Unwheel2 - VCTF Game - Sponic Mesh 3D
    Shh.. dont tell anyone about my android apps.
    will code for money

  13. #13
    Iron Guard
    Join Date
    Nov 2009
    Location
    CA
    Posts
    567

    Default

    Quote Originally Posted by tegleg View Post
    the factory initialises the physics.
    if you dont use a factory and place the vehicle instead put this in postbeginplay()
    Mesh.WakeRigidBody();
    Awesome. Thanks Tegleg

  14. #14

    Default

    To do this with the manta, what is the diference?

  15. #15
    God King
    Join Date
    Feb 2010
    Location
    Tegleg Records
    Posts
    4,399
    Gamer IDs

    Gamertag: tegleg digital

    Default

    its the same exept you dont have to do anything with the wheels.
    all the speed variables ect are in the sim object still, they have obvious names so it shouldnt be too difficult to work out whats what.
    Code:
    We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
    LOOK>> Please ask questions in the forum, NOT a private message <<LOOK
    tegleg.co.uk
    My Tutorials n Stuff
    Games: NEW! Tegs Playground Multiplayer Edition
    Unwheel2 - VCTF Game - Sponic Mesh 3D
    Shh.. dont tell anyone about my android apps.
    will code for money

  16. #16

    Default

    tegleg and how do I create a custom morph target? I've searched the geodav tutorial but he doesn't explain this.... thanks

  17. #17
    God King
    Join Date
    Feb 2010
    Location
    Tegleg Records
    Posts
    4,399
    Gamer IDs

    Gamertag: tegleg digital

    Default

    geodav explains morph targets somewhere
    possibly in a ut3 video
    Code:
    We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
    LOOK>> Please ask questions in the forum, NOT a private message <<LOOK
    tegleg.co.uk
    My Tutorials n Stuff
    Games: NEW! Tegs Playground Multiplayer Edition
    Unwheel2 - VCTF Game - Sponic Mesh 3D
    Shh.. dont tell anyone about my android apps.
    will code for money

  18. #18

    Default

    ehh I'll search it but aniway at the moment is not important thx aniway for the reply... but i need your help again.
    I made the bone system, physics asset, anim tree for my own mesh; I can enter the vehicle, move around the camera, but the problem is that when I press W or S the back wheels start rotating, but the vehicle stands in place. I can steer left and right with A and D, but I only turn in place.
    please I wait your reply

  19. #19
    God King
    Join Date
    Feb 2010
    Location
    Tegleg Records
    Posts
    4,399
    Gamer IDs

    Gamertag: tegleg digital
    Code:
    We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
    LOOK>> Please ask questions in the forum, NOT a private message <<LOOK
    tegleg.co.uk
    My Tutorials n Stuff
    Games: NEW! Tegs Playground Multiplayer Edition
    Unwheel2 - VCTF Game - Sponic Mesh 3D
    Shh.. dont tell anyone about my android apps.
    will code for money

  20. #20

    Default

    tried but I have the same problem... but when i press w also the car moves slowly to the left and keep until it falls off the map

  21. #21
    God King
    Join Date
    Feb 2010
    Location
    Tegleg Records
    Posts
    4,399
    Gamer IDs

    Gamertag: tegleg digital

    Default

    did you actually read this bit?
    "Wheels spin but no movement"

    you have to actually do what it says too
    Code:
    We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
    LOOK>> Please ask questions in the forum, NOT a private message <<LOOK
    tegleg.co.uk
    My Tutorials n Stuff
    Games: NEW! Tegs Playground Multiplayer Edition
    Unwheel2 - VCTF Game - Sponic Mesh 3D
    Shh.. dont tell anyone about my android apps.
    will code for money

  22. #22

    Default

    Hello all, first post here :-)

    Followed this excellent tut and have a jeep type vehicle working fine apart from the following issue:

    The Scoprion has a chase camera that pulls back when you accelerate forward. I dont want my camera to do this but to remain in position at the socket i have placed in the drivers seat ( still need to be able to look around)

    Any ideas where i can disable the camera " pull back"

    Ceers in advance and thanks again for the TuT :-)

  23. #23
    God King
    Join Date
    Feb 2010
    Location
    Tegleg Records
    Posts
    4,399
    Gamer IDs

    Gamertag: tegleg digital

    Default

    thanks, glad you found it helpful
    i have a vehicle camera guide on my tutorials page
    Code:
    We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
    LOOK>> Please ask questions in the forum, NOT a private message <<LOOK
    tegleg.co.uk
    My Tutorials n Stuff
    Games: NEW! Tegs Playground Multiplayer Edition
    Unwheel2 - VCTF Game - Sponic Mesh 3D
    Shh.. dont tell anyone about my android apps.
    will code for money

  24. #24

    Default

    Thanks again.
    But where do i put the code?
    Do i need to remove any of the scorpion's code?

    I'm a coding novice but experienced modeler..just trying to get my jeep model working so i can move on :-)

  25. #25
    God King
    Join Date
    Feb 2010
    Location
    Tegleg Records
    Posts
    4,399
    Gamer IDs

    Gamertag: tegleg digital

    Default

    if you copied the scorpion just put the code in there.
    its original camera is defined in UTVehicle so you can just overide it like that
    Code:
    We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
    LOOK>> Please ask questions in the forum, NOT a private message <<LOOK
    tegleg.co.uk
    My Tutorials n Stuff
    Games: NEW! Tegs Playground Multiplayer Edition
    Unwheel2 - VCTF Game - Sponic Mesh 3D
    Shh.. dont tell anyone about my android apps.
    will code for money

  26. #26
    MSgt. Shooter Person
    Join Date
    Jan 2013
    Posts
    298

    Default

    Awesome tutorial. I was able to get my space ship into the game and flying around using the Cicada scripts. My big question is though, it being a space and everything, is how do I reference keyboard input into the controls of the ship. What I mean is its a space ship not a hover craft so in order to change my map I set gravity to zero but obviously when I get into the ship hitting the D key makes it strafe right and A strafe left but I want to change this to make the ship role and take on a more space like flying system. I've looked everywhere in the parent classes with UnCodeX but I can't seem to find where this input is taken and how to modify it to do what I want. Any help would be appreciated!

    Thanks

  27. #27
    God King
    Join Date
    Feb 2010
    Location
    Tegleg Records
    Posts
    4,399
    Gamer IDs

    Gamertag: tegleg digital

    Default

    thanks
    for a spaceshid you are going to have to ditch the SimObject, it restricts the ships movement so simply delete it.
    someone wrote a great tutorial for this here
    http://descent.silverball-magic.com/...torial_ini.pdf
    Code:
    We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
    LOOK>> Please ask questions in the forum, NOT a private message <<LOOK
    tegleg.co.uk
    My Tutorials n Stuff
    Games: NEW! Tegs Playground Multiplayer Edition
    Unwheel2 - VCTF Game - Sponic Mesh 3D
    Shh.. dont tell anyone about my android apps.
    will code for money

  28. #28
    MSgt. Shooter Person
    Join Date
    Jan 2013
    Posts
    298

    Default

    oh wow thats perfect, thanks again!

  29. #29

    Default

    Hey peeps!

    First of all. cheers for this awesome tutorial tegleg!

    Hope I'm not asking this in the wrong place...

    But now to the point, I've been able to follow this tutorial to get my custom vehicle working but now I would like to take it a step further.
    What I would like to do is to make a custom vehicle, but instead of having a wheeled vehicle, I would like a hovering vehicle like the manta (with its behavior, except for the jumping part)
    but with the scorpion control scheme. I've been looking around a lot after an answer to this but all the tutorials I've seen that contains a hoving vehicle still uses the original mantas
    controls scheme (A + D is used to strafe instead of turning).

    Which would be best approach to get something like that? Any help or pointing in the right direction would be greatly appreciated.

    Ps. Sorry for reviving this old thread but thought it would be better to ask here then in a seperate, new topic.

  30. #30
    God King
    Join Date
    Feb 2010
    Location
    Tegleg Records
    Posts
    4,399
    Gamer IDs

    Gamertag: tegleg digital
    Code:
    We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
    LOOK>> Please ask questions in the forum, NOT a private message <<LOOK
    tegleg.co.uk
    My Tutorials n Stuff
    Games: NEW! Tegs Playground Multiplayer Edition
    Unwheel2 - VCTF Game - Sponic Mesh 3D
    Shh.. dont tell anyone about my android apps.
    will code for money

  31. #31

    Default

    Hi there Quick Question! When I try to put my vehicle into the map it shows in UDK but when i play the game it doesn't show! Also! When I try to input it into ActorFactory vehicle and select my Tankcontent. It freezes. Think you would know of anything?

  32. #32

    Default

    Thanks tegleg!

    Totally missed that there was a part 2, will take a look at it when I get home from work.

  33. #33
    Redeemer
    Join Date
    Apr 2009
    Location
    Jacinto
    Posts
    1,487
    Gamer IDs

    Gamertag: Keltar3007

    Default

    HEy, Tegleg...I used the sorpion as a template abd when I try to test my vehile (its still wip), it doesnt spawn. WHen I place the vehicle factory on the map, I can see the skeletal mesh, but when I play, theres nothing there.

  34. #34
    God King
    Join Date
    Feb 2010
    Location
    Tegleg Records
    Posts
    4,399
    Gamer IDs

    Gamertag: tegleg digital

    Default

    place the vehicle, not the factory.
    Code:
    We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
    LOOK>> Please ask questions in the forum, NOT a private message <<LOOK
    tegleg.co.uk
    My Tutorials n Stuff
    Games: NEW! Tegs Playground Multiplayer Edition
    Unwheel2 - VCTF Game - Sponic Mesh 3D
    Shh.. dont tell anyone about my android apps.
    will code for money

  35. #35

    Default

    Hi Tegleg..
    Thanks for the tutorial dude, it's really really awesome..
    I played with all the variables in defaultproperties as u suggested above except for "MinHardTurnSpeed=99999.0"
    I couldn't find 'MinHardTurnSpeed' in UTVehicle_Scorpion. : (

    Now I used my custom car based on the scorpion code (I deleted functions that I think I dont need), but I got a problem. My custom car only have three sound effects which are CollisionSound, EnterVehicleSound and ExitVehicleSound.
    My custom car doesn't have any sound while accelerating, no looping engine sounds etc as I don't know how to set them :'(
    I want to make my car sounds like ur car in unwheel.
    Could u please me tell me how to set the sounds effect for custom car?

  36. #36

    Default

    Nevermind, I got the answer, geodav posted about it a long time ago (2010.. )

  37. #37
    MSgt. Shooter Person
    Join Date
    Dec 2011
    Posts
    329

    Default

    hello, do you have any usefull links on how to setup vehicle for udk?

  38. #38
    God King
    Join Date
    Feb 2010
    Location
    Tegleg Records
    Posts
    4,399
    Gamer IDs

    Gamertag: tegleg digital

    Default

    what more do you need?
    between me, geodav and other peeps i think everything is covered.
    Code:
    We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
    LOOK>> Please ask questions in the forum, NOT a private message <<LOOK
    tegleg.co.uk
    My Tutorials n Stuff
    Games: NEW! Tegs Playground Multiplayer Edition
    Unwheel2 - VCTF Game - Sponic Mesh 3D
    Shh.. dont tell anyone about my android apps.
    will code for money

  39. #39
    MSgt. Shooter Person
    Join Date
    Dec 2011
    Posts
    329

    Default

    Quote Originally Posted by tegleg View Post
    what more do you need?
    between me, geodav and other peeps i think everything is covered.
    bones and proper rig

  40. #40
    God King
    Join Date
    Feb 2010
    Location
    Tegleg Records
    Posts
    4,399
    Gamer IDs

    Gamertag: tegleg digital

    Default

    everything you need for bones and rigging in either 3ds max or blender is here
    http://www.youtube.com/user/ut40kgeodav/videos
    there are also maya tutorials all over the place if you use that, heres one on here even
    http://forums.epicgames.com/threads/...ehicle-In-Maya
    Code:
    We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
    LOOK>> Please ask questions in the forum, NOT a private message <<LOOK
    tegleg.co.uk
    My Tutorials n Stuff
    Games: NEW! Tegs Playground Multiplayer Edition
    Unwheel2 - VCTF Game - Sponic Mesh 3D
    Shh.. dont tell anyone about my android apps.
    will code for money


 
Page 1 of 2 12 LastLast

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.