• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Custom Gun Models

tivial01

New member
I imported a model from Unity but for some reason with I import it in game the player holds it to high and aims through the gun I cant figure how to fix this.

I Have tried that but I still cant get it to work

 
Last edited by a moderator:
The position the of the gun is determined by its handhold type and its position/orientation in Unity. Extract a 7d2d rifle mesh out of the assets file and import that into Unity as a template for positioning. Then use that rifles handhold type as found in misc.xml.

 
The position the of the gun is determined by its handhold type and its position/orientation in Unity. Extract a 7d2d rifle mesh out of the assets file and import that into Unity as a template for positioning. Then use that rifles handhold type as found in misc.xml.
I tried that and it didn't work still ran into the same problem

 
I am also Having the same problem trying to import a grenade. Is it possible that my problem is I am using xml codes that are already there. For example I am trying to load a M4A1 model from unity so in my items xml file i just copy and paste the AK47 code and and change the name and meshfile location. same with grenade I use the pipebomb xml code could this be my problem?

here is an example of what i mean this is actually the dynamite one not pipe bomb

<item id="181" name="Grenade">

<property name="Class" value="ItemClassTimeBomb"/>

<property name="Meshfile" value="#Grenade?GrenadePrefab"/>

<property name="Material" value="MDynamite"/>

<property name="CustomIcon" value="tnt"/>

<property name="HoldType" value="21"/>

<property name="Stacknumber" value="40"/> <!-- STK explosives -->

<property name="EconomicValue" value="71"/>

<property name="Explosion.BlockDamage" value="900"/>

<property name="Explosion.EntityDamage" value="320"/>

<property name="Explosion.ParticleIndex" value="1"/>

<property name="Explosion.RadiusBlocks" value="3"/>

<property name="Explosion.RadiusEntities" value="6"/>

<!--<property name="Explosion.DamageBonus.stone" value="0"/><property name="Explosion.DamageBonus.metal" value="0"/><property name="Explosion.DamageBonus.earth" value="0"/><property name="Explosion.DamageBonus.cloth" value="5"/><property name="Explosion.DamageBonus.wood" value="0"/><property name="Explosion.DamageBonus.water" value="0"/><property name="Explosion.DamageBonus.glass" value="1"/>-->

<property name="FuseTime" value="4"/> <!-- End: Needed for time in sec, max 6 -->

<property name="DropScale" value="2"/>

<property class="Action0"> <!-- AttackAction -->

<property name="Class" value="ThrowAway"/>

<property name="Delay" value="1.2"/>

<property name="Throw_strength_default" value="8"/>

<property name="Throw_strength_max" value="30"/>

<property name="Max_strain_time" value="1.5"/>

<property name="Sound_start" value="swoosh"/>

</property>

<property class="Action1"> <!-- UseAction -->

<property name="Class" value="Activate"/>

<property name="Delay" value="1"/>

</property>

<property name="ThrowableDecoy" value="true"/>

<property name="Group" value="Ammo/Weapons"/>

<property name="CraftingSkillGroup" value="craftSkillScience"/>

</item>

 
Last edited by a moderator:
Back
Top