Announcement

Collapse
No announcement yet.

Stuck on vehicle creation

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

    #16
    ok I tried to reproduce your spinning car in my physics asset but couldn't so it's probably not that, the only thing I can say is what they^^ said.

    Comment


      #17
      Yeah, I've had models fly straight up in the air in PhAT, but still working just fine when fully set up in the vehicle movement component. Remember that you must at the very least assign your wheel names there in order for things to work just a little bit.

      So try Jacky's suggestion. It really should be completely straight forward.

      Comment


        #18
        Hi Guys,
        Thanks for the replies, so basically, I've made a little test piece using cubes and cylinders which is behaving itself in the PhAT window. The difference was that in creating the bones I tried to give them a bit of length so that it is easier to spot the direction they are facing. I've made sure that they are spot on with their positioning and orientation.
        I've rebuilt the bones for the buggy in the same method now and it seems to be behaving in the PhAT window, it is stationary in the game window (though floating above the ground). So that part seems to be a case of ensuring the bones are perfect alignment.
        The new problem is that after hooking up the controls there is no movement, after spending most the day on it I think I'll wait till tomorrow to start on this next part.
        Getting there slowly though!
        Thanks again for the help, I think if there wasn't the help and suggestions from the forum I'd have quit by now!
        Cheers
        Mat-Art

        Comment


          #19
          not sure if i'm to late with this, but if your using a skeletal rig then make sure the root bone is at 0,0,0

          i had a problem that the mesh flew off in phat and adding the root bone fixed it
          UT40K:The Chosen - Warhammer 40,000 for UE4
          ut40kgeodav - UE4 Tutorials

          Comment


            #20
            Hi,
            I had something like that happen when I tried to import a model from Blender BEFORE I applied GEODAV's .FBX fix to the io routine. Basically, blender had added an extra bone to the top of the bone structure and messed things up bigtime during the FBX exporting process. You wouldn't happen to be having a similar problem would you?

            Comment


              #21
              Originally posted by Mat-Art View Post
              The new problem is that after hooking up the controls there is no movement
              Some more ideas here:

              Assuming that the player input and wheel setup in the vehicle blueprint is correct (and it probably is considering how many times I guess you've done this from scratch by now it might be a good idea to check the orientation of the wheel bodies in PhAT. You can verify their orientation by enabling the translation tool in the PhAT preview window. This will show the standard manipulator widget for the selected body, so you can see where its axes are pointing.

              The reason I suggest this, is that one of the first gotchas I encountered when exporting a simple test vehicle from Cinema 4D was that although everything looked correct visually, it turned out that the wheels' physics bodies were in fact rolled 90 degrees around X, and this (apparently) made it impossible for the vehicle movement component to actually, you know, move anything. I always assumed this was just a quirk related to Cinema and its FBX export, but maybe it can happen under different conditions as well.

              Does 3DSMax use Z up by default?

              Comment


                #22
                Hi Geodav, I made sure that the root and the mesh pivot point were both at 0,0,0. It just seems to be doing a weird thing of sitting above the ground not doing anything. Though at least it isn't flying off in different directions now.

                Hi Demolition Man, The bones system in Max doesn't add any extra bones when exporting (in Max I have a root and 4 wheels and they come through to Unreal). Unless you use a CAT rig, as it adds a bone for the root and the base system which wont export from Max. It sees it as having too many root bones, the way round that was to parent the bones to the base in the schematic/ hierarchy window and it came through without any problems.

                Hi Xenome, yeah I've had to do this a fair few times now, I think It should be ingrained in my brain once I actually get it working! I'm going to have a look at the orientation of the wheels in PhAT, hopefully it will be that!
                Cheers
                Matt

                Comment


                  #23
                  Hi guys, just a quick update on the buggy. The wheels are setup to the bones and the physics have been applied as kinematic, that has now dropped the car to the surface in game. Still no movement though so I've had a look at the orientation in the PhAT window as Xenome suggested. It's changed the orientation from what it is in Max. I've posted a picture here to show what I mean

                  http://matts-gameworks.tumblr.com/

                  I tried using the rotation tool in the PhAT window but it didn't seem to work, I can rotate it round but there is no effect in game. Is it a case of going back to Max and altering it there?
                  Cheers
                  Mat-Art

                  Comment


                    #24
                    Originally posted by Mat-Art View Post
                    I tried using the rotation tool in the PhAT window but it didn't seem to work, I can rotate it round but there is no effect in game. Is it a case of going back to Max and altering it there?
                    Probably, yes. From what I've seen, it's really important that the physics bodies for the main root and the wheels end up having the UE standard x-forward, y-right, z-up orientation in the physics asset. So, try to rotate your wheel pivots in Max to counteract the error you're seeing, and export/import again.

                    Fingers crossed that it's the missing piece of the puzzle, and big props to you for not giving up!

                    Comment


                      #25
                      ok Mat, to me that looks like the standard mistake in max i show how to do this in my old ut3 video's,
                      1st. what ever you do don't use max bones
                      2nd. use max objects, i used pyramids
                      3rd. for each bone/object align it along the x-axis then go to the hierarchy tab click on affect povit point only then click align to world
                      4th. link all the bones/objects to the root bone/object which is at 0,0,0
                      UT40K:The Chosen - Warhammer 40,000 for UE4
                      ut40kgeodav - UE4 Tutorials

                      Comment


                        #26
                        Hey guys, Thanks for all the help!
                        I've managed to get it working and I think I've been a bit of a tool.
                        So I was getting really frustrated with the process and thought I'd have a look at the example project again to see how that behaves. When I played the game it wasn't doing anything at all which I thought was somewhat odd.
                        After clicking in the game area/ viewport with the mouse rather than just using the keyboard input, the car started moving! So I reloaded the buggy again and did the same thing and it is moving around.
                        Holy ****, I think I'll be bald by the time I get the fully working vehicle in there! Though I've been through the setup process that many times I should be able to do it in my sleep now.
                        Cheers again for the help!
                        Mat-Art

                        Comment


                          #27
                          Oh dear!

                          But, you know... progress has been made. Awesome!

                          Comment


                            #28
                            Originally posted by Jacky View Post
                            No skinning is necessary for a basic chasis & wheels setup really. Follow these steps and see how it goes:

                            Get rid of all the bones
                            Set the body's pivot to 0,0,0
                            Set each wheel's pivot at wherever you set those bones in the video
                            Select the wheels and Link them to the body
                            Select everything and export

                            Import into the engine - Enable Import Rigid Mesh and Import Meshes in Bone Hierarchy
                            Open up Phat(create one if you dont have it already)
                            Delete all the physics bodies and create a box for the chasis of the car as smokey suggested(make sure it doesnt touch the floor - you can adjust its position and scale inside Phat editor), and capsules or spheres for the wheels.

                            Ignore all simulation absurdities in Phat and create your wheel and vehicle blueprints following Ori's videos.

                            It has to work. If it doesnt, then you can create a simple car reproduce the issue and upload so that we can take a look.
                            I Was using blender and the bones setup with armature did not work, I had the same result as described here.
                            After following Jacky's description above and setting the car in Phat to "default" and the 4 wheels to kinametik it started to work. I rotated the wheels to follow the cylinder of the wheels.

                            Tnx for that.
                            Last edited by Rumon; 06-24-2014, 04:06 PM.

                            Comment


                              #29
                              I've had great success with models... i have many very high poly models(with 160+ bone skeletons) with facial animations in the game and love it... but cars... no so much...

                              I've tried with and without bones... after trying 181 times I managed only 1 time to get a vehicle that didn't fly off the earth on start... tried blender/maya/3ds max and c4d... I find it incredibly vexing... I managed to import a downloaded vehicle successfully, only once looks good, wheels work perfectly, only the car drives -90 degrees from the model... decided that I can't do any of the custom vehicles I made, so I gave up on it...

                              I find that the 4.4 preview imports more successfully... give it a try with that using a simple box vehicle...

                              Comment


                                #30
                                Originally posted by DarkLichNY View Post
                                I've had great success with models... i have many very high poly models(with 160+ bone skeletons) with facial animations in the game and love it... but cars... no so much...

                                I've tried with and without bones... after trying 181 times I managed only 1 time to get a vehicle that didn't fly off the earth on start... tried blender/maya/3ds max and c4d... I find it incredibly vexing... I managed to import a downloaded vehicle successfully, only once looks good, wheels work perfectly, only the car drives -90 degrees from the model... decided that I can't do any of the custom vehicles I made, so I gave up on it...

                                I find that the 4.4 preview imports more successfully... give it a try with that using a simple box vehicle...
                                Hey man, let me know if you have any issues getting it to work, I have been able to get most of mine first try since UE4 version 4.2 came out it became really easy to get a car working. You no longer need to use bones for it, just make the car 1 mesh and each of the wheels 1 mesh each. Then make sure they are aligned properly, and then use the "Link" tool (top left on the main toolbar), and click and drag on a wheel and let go over the body mesh, repeat for each wheel, and you are done.

                                Before doing that make sure you align all of the parts to be X axis forward, and if you use bones, and make sure the vehicle (or root bone if using them) is centered on 0,0,0, then link it all together, then export it out to UE4.

                                The reason your car was driving -90 degrees was likely that the bone itself (the root bone and/or the wheel bones) were rotated -90 on Z (which it seems to default to), or because your vehicle wasn't set to X axis forward, but if it still wont work you can send me the model and I'll take a look for you.

                                This is the way to set it all up in UE4, see here for details on the editor setup:
                                https://docs.unrealengine.com/latest...icleUserGuide/

                                But again, let us know if you have any issues!
                                Last edited by DotCam; 08-02-2014, 12:38 PM.
                                Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap

                                Comment

                                Working...
                                X