Announcement

Collapse
No announcement yet.

[WALK-THROUGH] Fully Functional Vehicle (my first car).

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #76
    don't worry about it so long as the origin was at 0,0,0 it will be fine

    Comment


      #77
      ok, so that was an epic fail.

      i got the wheel controllers in place, i tested wheel/turn rotation and wheel displacement witch seemed to work ok.

      as for a code test, i tried to follow TEGLEG's tutorial on scripting your own vehicle, i maneged to copy the scorpian scripts into a new project folder, rename them and recompile but it did'nt work. i did find the new scripts in the actor factory and when i droppe the actor (scorpian) into a new map it let me drive it but obviously it wasnt my car. then again i probably didnt name any of my assets properly anyway.

      so i have no idea where to go from here

      Comment


        #78
        the main parts are in the default properties of the 3 files, make sure they point to your packages, the same goes for the wheel code

        here's a link to my old ut3 tutorial for a jetbike but the idea is the same if you follow it through https://sites.google.com/site/ut40km.../ut3-cv-part-1

        Comment


          #79
          ok, so bad news. after going through all the tutorials and stuff i have come to realize it might take a while for me to get my head round the package setup/materials/physics asset/animtree/and script, so wont be able to see my model as a drivable car in UDK just yet.

          i will try to get my car working again soon but have some stuff to learn before that.

          thread closed for now, but will be back ASAP.

          Comment


            #80
            thread reopened

            ok so i guess it's update time.

            i have done the physics asset, physical materials, basic animtree(just the wheels), i have also set up all the materials (not sure if i did them right but as im more interested in making a fully functional car it doesnt really matter if it looks pants, it did change the texture to the dirty diffuse when it blew up so it kind of works).

            now to a part i know nothing about, the script, i copied the 4 script files to a new file, i renamed them and changed all of the relavent code for my mesh name/bones...ect (think i did it right but i dunno, probably not knowing my luck), just a side note i did not get any errors or warnings when i recompiled the scripts.

            i have got slightly further then i did before but it has some serious issues, i made this little vid to show you what i mean.( i hope this link works, never done one to youtube before, then again never uploaded to youtube before either)
            http://youtu.be/iD-ZaaRB6wY
            see it definately has issues but i suppose it is quite funny, anyway when i first tried to drive it the wheels were spinning in the right directons but it very slowly slid sideways instead of moving bakward and forward. i bodged it by rotating the mesh in the skeletal mesh viewer so now it goes forward and backward but it goes forward when i press "S" and backward when i press "W". also i dont know why the right hand side of the car is basicaly scrapping the floor.

            i think thats about it for the update, uhhh yup thats it

            so what do you think, is it fixable and if it is how do i fix it?

            Comment


              #81
              ok i know Spoof said to turn it round in the mesh viewer but i still think that will cause problems as movement is applied to the bone direction afaik which is why its important, i know its a prob with blender fbx,
              next increase the radius of the wheels in the code, it also looks like the front right is smaller maybe you missed typed the size

              Comment


                #82
                i left the wheel size values in the script at there default because i just wanted to get it working first, also the wheels on the front are the same sizes on both sides. i dont get why the whole car is leaning like that anyway, i had a walk around it in game and the wheel hubs on the left side are roughly at the height they should be but the hubs on the right are right next to the ground. its very strange

                --EDIT--

                just been playing with the max displacement setting for the skeletal controlers, in the video they are set to 15, i just changed them to 50 and it sank even further into the ground, on the right hand wheels the tyre and part of the rim were under the ground but on the left wheels only about 3/4 of the tyre was underground, also the whole car is still slanted.
                i also just rechecked the scripts and there all still at the default.

                Comment


                  #83
                  nps, just up the size in code, do it in smallish steps like 5, double check the wheelskelcontroller you may have altered the displacement value also check it in the wheel code

                  so its a bit like this
                  Code:
                  	Begin Object Class=UDKVehicleWheel Name=RMWheel
                  		BoneName="RightWheel_04"
                  		BoneOffset=(X=0.0,Y=0,Z=0.0)
                  		WheelRadius=26
                  		SuspensionTravel=20
                  		SteerFactor=0.0
                  		LongSlipFactor=250.0
                  		LatSlipFactor=20000.0
                  		HandbrakeLongSlipFactor=250.0
                  		HandbrakeLatSlipFactor=1000.0
                  		SkelControlName="RightWheel_04_Cont"
                  		
                  	Wheels(1)=RMWheel

                  Comment


                    #84
                    ha you posted while i was typing. the wheel radius is set to 27. if i knew how to post the script i would but i dont so i cant

                    Comment


                      #85
                      click the "GoAdvanced" button then in the window you'll see some extra buttons use the # button to add the code tags

                      Comment


                        #86
                        what do yo mean by code tags? and do i need to host them or what?

                        Comment


                          #87
                          no just use the code tags like a pic but paste your code between the tags

                          Comment


                            #88
                            fingers crossed

                            Code:
                            /**
                             * Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
                             */
                            class UTVehiclebuggyWheel extends UDKVehicleWheel;
                            
                            defaultproperties
                            {
                                WheelRadius=27
                                SuspensionTravel=40
                                bPoweredWheel=true
                                SteerFactor=0.0
                                LongSlipFactor=2.0
                                LatSlipFactor=2.75
                                HandbrakeLongSlipFactor=0.7
                                HandbrakeLatSlipFactor=0.3
                                ParkedSlipFactor=10.0
                                bUseMaterialSpecificEffects=true
                            }
                            ok thats the wheel code

                            Comment


                              #89
                              and this is the bit from the UTvehicle script

                              Code:
                                  Begin Object Class=UTVehiclebuggyWheel Name=RRWheel
                                      BoneName="buggy_RR_wheel"
                                      BoneOffset=(X=0.0,Y=20.0,Z=0.0)
                                      SkelControlName="buggy_RR_wheel_control"
                                  End Object
                                  Wheels(0)=RRWheel
                              
                                  Begin Object Class=UTVehiclebuggyWheel Name=LRWheel
                                      BoneName="buggy_LR_wheel"
                                      BoneOffset=(X=0.0,Y=-20.0,Z=0.0)
                                      SkelControlName="buggy_LR_wheel_Control"
                                  End Object
                                  Wheels(1)=LRWheel
                              
                                  Begin Object Class=UTVehiclebuggyWheel Name=RFWheel
                                      BoneName="buggy_RF_wheel"
                                      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="buggy_RF_wheel_Control"
                                  End Object
                                  Wheels(2)=RFWheel
                              
                                  Begin Object Class=UTVehiclebuggyWheel Name=LFWheel
                                      BoneName="buggy_LF_wheel"
                                      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="buggy_LF_wheel_Control"
                                  End Object
                                  Wheels(3)=LFWheel
                              i used the scripts TEGLEG says to use in his vehicle tutorial thred.

                              Comment


                                #90
                                remove the bone offset
                                you don't need it
                                the rest looks fine

                                Comment

                                Working...
                                X