WildFyr Documentation > Zanoza Modeler 3 Tutorials > How to create roll out drawers

How to create roll out drawers

What you need

For this tutorial we will need a few things to get you started. This tutorial will work on all drawers whether they are in a sedan trunk, truck bed, or SUV hatch.


If you need a car, you can use Otaku's Expedition for a cargo compartment drawer we can use Sniper67's Setina Drawer


Do you find articles like this useful?

Donate to WildFyr to keep the flow of free tutorials coming and to stop the gatekeeping in the dev community!

Donate via Ko-Fi


Getting started

First off, get your drawer all situated in the back of your car, once it is all in place and where you like it, we can export it as an OBJ to bring into Blender. MAKE SURE YOUR DRAWER STAYS DETACHED! It needs to move on its own. If your drawer came attached to the rest of the mesh you might need to detach it and make a custom interior.

When exporting ensure to select "Split by groups" in the dropdown menu, then click export, over in Blender select your OBJ, and also select "Split by Group".

Cargo Drawer in rear of car
Exporting to OBJ
Importing into Blender

The reason we are in Blender, is because out dummy is set up to move the drawer in meters, so we need to know how many meters it should extend backwards out the car. We don't want the drawer to come out too much and be floating, we also don't want it to not move enough and be stuck inside still. Since we slip the mesh by objects, we can select just out drawer and pull it out on the Y axis by pressing G and Y. Move it out until it looks like a good distance out, (You may want to hide the hatch so you can see the drawer itself) Then in the lower left-hand corner see how far it was moved in the move dialogue box. We want to round this number to the nearest tenth digit, so as mine was -0.49498m, I will round to -0.5m and set that in the box. After you have set your new number and clicked enter, ensure the drawer is still inside the bounds of your box and won't be floating, if it is your all set, if it did come out bring your number down by one tenth's place.

Moving the drawer in Blender to get the correct size
Getting final measurements

Once we have this number, that is all we need Blender for. Blender makes it easier than guessing, exporting to game, and testing each time.

Compounding the Slider

Back in ZMod, we want to import the Slider Dummy, you can Download the dummy here. Go to file merge and merge the dummy into the scene, then drag it to the center position of your drawer. Next we want to select the dummy, head over to the Properties tab, and enter user defined options. Edit the SlideZ option, and change the second number from -1.325 to whatever number to got from moving your drawer in Blender, click ok and apply.

Importing dummy
Moving the dummy
User-Defined Options
Setting the movement in the dummy

Now we will be compounding the dummy and putting all your LODs into it. Remember, this drawer will be seen from a distance, but the objects inside it will not. You only need to LOD the things inside the drawer to L0, and the drawer itself to L2 or L3. If you have a slider that is visible to the outside, say one from a fire command car with oxygen tanks you will want to LOD those to the same you do the drawer, L2 or L3. Or else they will pop in and out of existence as players get closer and farther from your model.

After it is LODed we need to make a collision for it, like other collisions draw a box around the drawer and align it with the mesh. Compound to COL and name it cargodoor [COL] place inside the cargodoor dummy. After that you can export your vehicle to GTA and see your drawer toggle open with your trunk!

LODing the dummy
Creating a collision
Compounding the collision

Do you find articles like this useful?

Donate to WildFyr to keep the flow of free tutorials coming and to stop the gatekeeping in the dev community!

Donate via Ko-Fi




Suggest an edit

Review this page

wildfyr

cargo door drawer cargo drawer trunk boot zmod gta v