PDA

View Full Version : Weapon placement problem



legacy-Mooseboy
01-23-2005, 10:49 PM
I have a custom model with a custom rig. Many weapons are placed nicely at the weapon bone, but others are not. Examples of correctly placed weapons are rocket launcher, mine layer, lightning gun, grenade launcher, and mini gun. Guns which are *not* in the right place are bio rifle, enforcer, and link gun. (I haven't tested all guns.)

Tweaking the translation values on the weapon bone affects all guns, so I can't fix one without screwing up the ones that work.

Any ideas?

legacy-Wackywack101
01-24-2005, 10:31 PM
Enforcer??

legacy-DaJMasta
01-24-2005, 11:58 PM
you can always replace the bone in the model, but i think theres a translation variable for the weapon, if not the socket the weapon has....sorry i dont remember what they are....

legacy-Mooseboy
01-25-2005, 07:51 AM
Yeah, each socket has rotation and translation parameters, but those affect all weapons equally. So when I tweak one of those values to make one weapon right, others that were already correct get out of whack.

legacy-DaJMasta
01-25-2005, 03:55 PM
i believe there is another adjustment somewhere in the weapon attachment code, I.E the third person mesh code, which is specific for each gun.

legacy-Mooseboy
01-25-2005, 06:21 PM
I'm not familiar with that. Google led me to this page: http://angelmapper.com/tutorials/coding2.htm

After reading the WeaponAttach description there, I get the impression that those settings are specific to each weapon and not adjustable on a per model basis.

I'm gonna check out some WeaponAttach files when I get home...

legacy-DaJMasta
01-25-2005, 06:33 PM
with some custom code u could probably do it, but i think it would be easier to change the bone you hold the weapon at in your 3d modelling program to fix it.

The variable you seem to be wanting to change is the attachment offset for the player model, but i could be wrong.

legacy-Mooseboy
01-26-2005, 10:36 AM
Found the solution.

I scaled up my model in Maya so that I could set the Ued mesh scale to 0.4. The Maya exporter set the scale to 10, but I overrode that.

After examining a number of Epic models and models created by others (key here is that the custom models had custom rigs) I saw that the scale factor ranges from 0.35 to 0.45 or so. Some custom models have a scale factor of 1, but their author (Slyrr) notes in the read me files that it was difficult getting the weapons to work correctly. I also tried a scale factor 1 with no success. This thread has more detail: http://boards.polycount.net/showflat.php?Cat=0&Number=19267&an=0&page=0#19267

I don't know what the boundaries are, but I think I saw something as large as 0.7 once.