[SOLVED] Cannot get collision working on props imported from GTA IV

Hi there,

I’m trying to convert some props from GTA4, used fivem formats:convert --game=ny to obtain the .ydr, .ybn and .ytd that I need and put all this into my project.

Ingame, the prop spawns with its texture and can be placed like any prop.

But as a famous great philosopher of our time says, NO COLLISION !

So, I included the collision into the ydr using 3dsmax and GIMS Evo and now the collision can be seen in OpenIV embedded inside the ydr but still no collision ingame. I tried a lot of combination of collision flags but still no collision…

What I got in 3dsmax :


The 3dsmax project for mode details : gb_hosp_basin01.zip (127.8 KB)

Here is the produced ydr file : gb_hosp_basin01.ydr (24.0 KB)

As you can see, OpenIV shows the bounds embedded into the ydr file :


Anybody got an idea for me ?

1 Like

OK, I solved it myself, it was related to the .ytyp file. In the archetype definition, I wasn’t setting the physicsDictionary right. Now it works with the following conf :

<Item type="CBaseArchetypeDef">
      <lodDist value="50.00000000"/>
      <flags value="549584896"/>
      <specialAttribute value="0"/>
      <bbMin x="-0.40000000" y="-0.20000000" z="-0.80000000"/>
      <bbMax x="0.40000000" y="0.20000000" z="0.80000000"/>
      <bsCentre x="0.00000000" y="0.00000000" z="0.00000000"/>
      <bsRadius value="1.68020000"/>
      <hdTextureDist value="5.00000000"/>
      <name>gb_hosp_basin01</name>
      <textureDictionary>gb_hosp</textureDictionary>
      <clipDictionary/>
      <drawableDictionary/>
      <physicsDictionary>prop_gb_hosp_basin01</physicsDictionary>
      <assetType>ASSET_TYPE_DRAWABLE</assetType>
      <assetName>gb_hosp_basin01</assetName>
      <extensions/>
    </Item>
3 Likes

MVP for posting the solution.