Game Development Community

Weapon MountPoint dont work

by Mathias · in Artist Corner · 02/25/2006 (3:44 pm) · 33 replies

Hi,

i have a little problem, i tried to model a weapon, i have done it like in this tutorial:

http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=9230

But the mountPoint and muzzlePoint dont work, the weapon get always with the center of the Bounding Box to the player model attached.

That is part of the script an $WeaponSlot is always 0 i think...but i am not a scripter.


datablock ShapeBaseImageData( IonCannonImage )
{
className = "WeaponImage";
shapeFile = "~/data/shapes/wep_ioncannon/ion_cannon2.dts";
emap = true;
scale = "0.6 0.6 0.6";

mountPoint = $WeaponSlot;
//offset = "0.1 0.15 0";
eyeOffset = "0.4 0.7 -0.5";
correctMuzzleVector = true;

// -- BeamProjectile, BulletProjectile, Projectile, LinearProjectile
projectileType = BulletProjectile;
item = IonCannon;



I hope someone can help me...thx a lot


best regards,
Mathias V.

About the author

Recent Threads

Page «Previous 1 2
#1
02/25/2006 (4:33 pm)
Did you create a node in your player dts file called mount1? This would be a dummy object placed at the position you want the weapon to position itself at.
#2
02/25/2006 (4:38 pm)
Oh hm i dont know that cause i dont have made the player model...
#3
02/25/2006 (5:36 pm)
Select the bounds mesh so its highlighted in the side view-port hit insert which will allow you to move the models pivot point move this were the players hand wood be..The muzzlePoint and mountpoint move them both to 0.0.0 freeze transforms on them both move muzzlePoint to the muzzlePoint dont freeze move mountpoint
to the mountpoint dont frees finsh the gun setup...export.
#4
02/25/2006 (5:53 pm)
Thx for you replies but it still dont work, i think the main problem is how to name this nodes, you cant do much wrong on the export.

I tried following notation for muzzle and mount:

mountPoint, mountpoint, mountPoint0, mountpoint0, mount0, Mount0, MountPoint0, Mountpoint.

Or might it be mount1....i will try this also now.
#5
02/25/2006 (6:26 pm)
This resource has all of the node naming conventions listed:

www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=4273
#6
02/25/2006 (6:31 pm)
Whats you dump file say?

simple cfg all you need
AlwaysExport:
MountPoint
muzzlepoint
ejectpoint
#7
02/25/2006 (6:43 pm)
Hm yes i know the DTS Nodes pdf and i dont use a cfg file cause the maya dts script export all nodes, i hope so but i am pretty sure :-)
#8
02/25/2006 (7:15 pm)
You need a cfg file what you think the exporter reads on export!
#9
02/25/2006 (7:25 pm)
Some of them don't require a cfg file, I use the Lightwave dts exporter and it handles it all internally. I'm not sure about the maya exporter though.
#10
02/25/2006 (7:59 pm)
It still dont work but something had happend, without the cfg file the dts got 11,4 kb and after 11.5 kb...but well i dont know what to do now, is the notation important maybe i should write

AlwaysExport:
mountPoint

or

mount0
#11
02/25/2006 (8:05 pm)
Send me the file ill look at it...if you wish..dmac@microway.net
#12
04/05/2006 (8:01 am)
And so we meet again ;)

Just a little note here: Yes, the cfg file IS needed with Maya. I read through my dump file one time when I didn't use it and found a section where it says: "removing unused nodes" and it then took the mount, eye, cam etc. out of the shape before compiling to .DTS.

For simplicity's sake I always use this:
AlwaysExport
*
in a file names dtsScene.cfg and then use only the nodes that I want in my model.
#13
08/06/2006 (8:57 am)
I'm having the same problem. Where do I put the dtsScene.cfg?

Thanks.

-Nick
#14
08/06/2006 (8:59 am)
I'm having the same problem. Where do I put the dtsScene.cfg?

Thanks.

-Nick
#15
08/06/2006 (9:13 am)
In your export folder
#16
08/06/2006 (9:15 am)
So now maybe I'm doing something wrong with the hypergraph. I took the weapon.cfg that came with the fps demo, and renamed it to pwd.cfg (name of my model file and dts) and even matched the case so it now my model has a MountPoint and MuzzlePoint. What could I be doing wrong?

Is there a tool to see the model and any utility points in the dts?

Thanks.

-Nick
#17
08/06/2006 (9:21 am)
Please note. I noticed above the posts read the model has to have a mount1 node. This is actually supposed to be a mount0 node. As for the location of your cfg file: Are you using Windows or Mac?

I have found what appears to be a bug in the Maya 7 exporter for Macs in that you can only export to the folder where the model resides. So to make sure everything works, keep the cfg file with the model and export to the same. Safest way to make sure it all works.
#18
08/06/2006 (9:23 am)
Everything's in the same folder. I've uploaded the model, cfg, dts, and dump if that'll help. They can be found here. The model is in .ma format, using Maya 7.0, on Windows.

www.geocities.com/incorrigibleideal/pdw.zip

Thanks.

-Nick
#19
08/06/2006 (9:24 am)
Please note. I noticed above the posts read the model has to have a mount1 node. This is actually supposed to be a mount0 node. As for the location of your cfg file: Are you using Windows or Mac?

I have found what appears to be a bug in the Maya 7 exporter for Macs in that you can only export to the folder where the model resides. So to make sure everything works, keep the cfg file with the model and export to the same. Safest way to make sure it all works.
#20
08/06/2006 (9:55 am)
First of all you need to have a proper uvmap/texture and get rid of the models XYZ orientation info "freez transforms" then look at your mount nodes there pointing the wrong way should be Z_up Y_Forward.

dont need any of this in the cfg

NeverExport:
Dummy*
DELETE*
Light0
Light1

+Error::AllowEmptySubtrees
+Error::AllowCrossedDetails
+Error::AllowUnusedMeshes
-Error::AllowOldSequences
-Error::RequireViconNode

Keep this
+Param::CollapseTransforms
Page «Previous 1 2