Home Technical Talk

How to make a car door openable ??

polycounter lvl 2
Offline / Send Message
Hassan polycounter lvl 2
Hello everyone, I am modelling a car , and I want to make the door to be openable in the game, do I have to attach it to the model but assign it as a different element, or export the doors in different FBX file alone, and when importing to unity, I connect it as a child to the main body, or is there a different way? 

Replies

  • Mark Dygert
    I'm mostly speaking from expereince with Unreal and Blueprints but a skeletal mesh is probably easier to work with in game. Its less assets to juggle and you control animations (open/closed) on that asset instead of setting up a fairly cumbersome system in the engine. Since it's a car you probably want other item to move and do things, hood, wheels, main body rocks or dips when you turn or stop? 

    I'm not saying you couldn't do it with separate objects, it is possible, but it gets hard to work with. 
  • Hassan
    Offline / Send Message
    Hassan polycounter lvl 2
    I'm mostly speaking from expereince with Unreal and Blueprints but a skeletal mesh is probably easier to work with in game. Its less assets to juggle and you control animations (open/closed) on that asset instead of setting up a fairly cumbersome system in the engine. Since it's a car you probably want other item to move and do things, hood, wheels, main body rocks or dips when you turn or stop? 

    I'm not saying you couldn't do it with separate objects, it is possible, but it gets hard to work with. 
    this maybe easier yes, but what if there is no rigging options? what do you recommend to do ? 
  • Alex_J
    Online / Send Message
    Alex_J grand marshal polycounter
    If you absolutely cannot deal with rigging, you'll need to do the thing Mark Dygert recommended against, and that's setting up the animations in Unity. To learn how to do that, check out the Unity Learn section on their website. I believe some of the beginner tutorials will explain how to set up simple animations. I remember doing some that had me make various primitive objects move back and forth, so opening and shutting a car door wouldn't be any different than that.

    All you'll need to do in that case is have the door be a separate mesh from the rest of the model. Imagine the car is two cubes. One cube is smaller and thinner, that's the door. You just make it pivot from the edge. I am not sure if it should be exported as a separate FBX or not, but the unity documentation can answer that for you. 
  • huffer
    Offline / Send Message
    huffer interpolator
    Easiest way (in Unreal, altough my experience is limited) - model your car and keep parts separate, link the different parts that move to helper objects (also linked to a master helper object in hierarchy) and animate those. For example, you'll have a dummy for the door (with correct pivot), animated to rotate and open, and the door mesh linked to it. You can export all your meshes and animation to Unreal in FBX as skeletal mesh (without the helpers), and have it play the door opening animation through blueprints. Don't have to do any skinning or bones, just a helper hierarchy. You can also animate everything else like hood opening and export those as different animations.
Sign In or Register to comment.