1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

UE3 - UDK WTF? Floating Vehicle?

Discussion in 'Mapping' started by MrSchatz777, Mar 23, 2015.

  1. MrSchatz777

    MrSchatz777 New Member

    Joined:
    Mar 23, 2015
    Messages:
    4
    Likes Received:
    0
    Hi. My name is Mark. I am a new comer to this community forum, looking for some help with my custom vehicle. I had followed a 5 part video tutorial on Youtube, by Jamie Telford, which he includes the download to his entire project. I have made my own car in 3ds Max and followed the steps needed in the PHat, AnimSet, and AnimTree. I then took Jamie's script and changed the necessary names, such as wheel names, skeletal mesh, Physics Asset ect... I also did disable mouse camera orientation, but I left the rest of the script the same as Jamie's. After a few trial and errors, I was able to compile the script, place the vehicle in my map, but when I went to run a test play, the vehicle was suspended in mid-air?????? I am not sure where the problem is coming from, but one thing I did try was placing the vehicle about 10,0000 UU's up in the air just to see if maybe it was because my wheel collision radius was to big. However, that did not resolve the problem, so I am left with not knowing what else I could of done wrong. Can anyone help me out???
     
  2. MrSchatz777

    MrSchatz777 New Member

    Joined:
    Mar 23, 2015
    Messages:
    4
    Likes Received:
    0
    ...here's an update....
    I was able to import Jamie's vehicle into my map, for some reason at first it would not compile, and I have noticed that his vehicle does the same thing. So, at least now I know it has to do with something that Jamie did wrong. What is it.... I have the faintest idea. It could be a number of things, such as collision setup incorrectly or possibly something missing in the script. If it helps, this is my script.....
    Code:
    // lets exend SVehicle and make our own custom vehicle class
    class FirstCar 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'FirstCar.VH_first_car'
        AnimTreeTemplate=AnimTree'FirstCar.AT_VH_first_car'
        PhysicsAsset=PhysicsAsset'FirstCar.VH_first_car_Physics'
    End Object
    // define all the wheels
    Begin Object Class=SVehicleWheel Name=FRWheel
    BoneName="VH_car_FR_tire"
    SkelControlName="FR_car_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="VH_car_FL_tire"
    SkelControlName="FL_car_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="VH_car_RR_tire"
    SkelControlName="RR_car_tire_CTRL"
    WheelRadius=22
    bPoweredWheel=true
    End Object
    Wheels(2)=RRWheel
    Begin Object Class=SVehicleWheel Name=RLWheel
    BoneName="VH_car_RL_tire"
    SkelControlName="RL_car_tire_CTRL"
    WheelRadius=22
    bPoweredWheel=true
    End Object
    Wheels(3)=RLWheel
    }
    For what ever it could be, I would like to get this resolved and any help is appreciated.
     
  3. RevBillyG

    RevBillyG Taking over the world.

    Joined:
    Nov 10, 1999
    Messages:
    1,243
    Likes Received:
    0
    First thing I'd check is to make sure the collision box is correct in phat (I think it's in there, it's been a year or two since I last did custom vehicles)
    Also, check the root point in your 3d program is correct.
     
  4. MrSchatz777

    MrSchatz777 New Member

    Joined:
    Mar 23, 2015
    Messages:
    4
    Likes Received:
    0
    Hi RevBillyG, and thanks for getting back to me. I tried checking everything you have said. In the PHat editor, I have compared my collision boxes to how the SK_VH_Scorpion vehicle is designed. With the scorpion, there are only 2 collision boxes, and mine only has one more due to the back end is taller then the front end. However, I am not sure if this makes a difference, but when I place the scorpion onto my map and move it, I always get an AI paths need to be rebuilt error. Once I do that prior to running a play test, the editor makes some adjustments to the scorpion to be closer to the ground. In addition, It does not matter how high I set the scorpion off the ground, after rebuilding the AI paths the editor always makes the correct adjustments to the scorpion but not my vehicle. Worse yet, if I only place my vehicle in the map, I then never get an AI reuild error at all, even if I force an AI rebuild, nothing changes. So it sounds like I need to include some sort of AI to my vehicle so that the editor will throw an AI error when I move my vehicle in different locations in the map. Could this be the problem? If so, how do I add an AI to my vehicle. None of the Youtube videos go into this...
     
  5. MrSchatz777

    MrSchatz777 New Member

    Joined:
    Mar 23, 2015
    Messages:
    4
    Likes Received:
    0
    ....update....
    So it appears that the AI is a Navigation Point Pathlist. From my findings, it seems that this is only available in the UTVehicle setup, and my setup is a SVehicle setup. Would I be correct with that the AI Navigation Point setup is not available in the SVehicle setup?
     
  6. RevBillyG

    RevBillyG Taking over the world.

    Joined:
    Nov 10, 1999
    Messages:
    1,243
    Likes Received:
    0
    It won't be the patching that's causing it. More likely a collison or bounds problem. Try opening the static mesh viewer and checking the bounds in there.
    Failing that, if you can upload the files somewhere I'll try to take a look.
     

Share This Page