Jump to content

Home

Attaching models to players


GangsterAngel

Recommended Posts

Posted

im attempting to attatch a model to a client.

but i want the model to be attatched on the hip.

 

i am using

 

#define JKG_WEAPON_LIMB  (1 << (G2_MODELPART_WAIST-10))

which i belive should be the back waist bolt.

 

but its attatching the model straight thru the center of the client....

 

help appreciated.

Posted

OJP does this by using model bones to attach extra weapons onto the models. There's a better, more robust solution involving rendering on the client side directly instead of using Ghoul2, but I haven't done that for OJP yet.

Posted

if the models you want to attach has always the same space angle when attached to a model., you can hardcode the angles in the glm or md3 as offset positions and angle and bolt it to a bone...

But if the you want to be able to bolt this attached model on various angles, you are forced to render the attached model yourself

Posted

Hmmm... another way I used to do in other engines is have two models:

 

One the true model used for the player (eg; weapon used when firing)

 

and

 

Two the fake prop model used for like this type of stuff.

 

For the prop model, you can offset the model in the modeling program and then save it. Eg; have say something for the back of the player you would move the mesh back a little bit, this way even though its being attach right to the bone it will be off in the correct way.

Posted
  Slider744 said:
if you want to setup the good angle for the attached model, you are forced to render it yourself...

attaching on a bone will not work...

...unless you do custom model tag surfaces for that exact purpose.

Posted
  razorace said:
OJP does this by using model bones to attach extra weapons onto the models. There's a better, more robust solution involving rendering on the client side directly instead of using Ghoul2, but I haven't done that for OJP yet.

 

do you mean visual weapon holstering? I thought it was using custom tags O.o

Posted

I wonder, could this attachment of models to players allow somebody to re-create the functionality of the Rail Detonator (from JK1/MotS) in JA?

 

raildet0lu.gif

 

Then again, I've seen mods that let you shoot grappling hooks into people's a$$e$, so apparently that's possible!

Posted

Hey Ace. Would it be possible to have weapons that you can see on your belt ect via just existing code? I thought I saw somewhere in the files that there are the tags for the weapons. Now I know it may be messy (as to have say pelvis_tag instead of bowcaster_tag cause bowcaster was made just for this feature), but if you offset them, it would work correct? To do a fake prop for say the saber and have it attached to the hip bones that way all models don't need to have the new tags?

Posted

The bolting weapons method that I used can't use offsets, the functions only allow direct bolting to tag surfaces. I've been meaning to get around to fixing this feature but I just haven't bothered with it yet.

Posted

btw gangsta, I did your dual gun code and put it in the cg_weapons file but i get a syntex error saying that the first "if" on the code is wrong. Any ideas why? Do you have a working version of it?

 

Thanks man

Posted

but hey what are the possibilities to bolt a model to the player WITHOUT editing the player models (so it would work with custom models too)??

Posted

Sure, just offset the model off a standard basejka bone/tag and then manually render it on the client side. It's not technically "bolted" to the model, IE it won't show up on hit detection scans, it it will LOOK like it's bolted to the model.

Posted
  Kurgan said:
I wonder, could this attachment of models to players allow somebody to re-create the functionality of the Rail Detonator (from JK1/MotS) in JA?

 

raildet0lu.gif

 

Then again, I've seen mods that let you shoot grappling hooks into people's a$$e$, so apparently that's possible!

 

You know Kurgan, I tried working on that for the next release of the old school mod but gave up, but I did do the carbo... a mots gun ;)

Posted

Why'd you give up? Some trick that made it not work?

 

Carb gun in Old School mod?? Woot!!

 

The only thing that stopped me from trying the OSM was it sounded like it was unbalanced, but maybe I was wrong...

 

The biggest hurdle is the code, but once that's done, some quality models and sound effects that give you the feel of the original weapon really would put the icing on the cake!

Posted

Hmm, i'm always looking for beta testers to tell me what direction I should go in. And if there's too much disagreement with weapon balance and such I can make the damage/velocity and such cvars.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...