GangsterAngel Posted October 23, 2005 Share Posted October 23, 2005 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. Link to comment Share on other sites More sharing options...
Darth_Kitty Posted October 24, 2005 Share Posted October 24, 2005 Well, its doing what you wanted but you need to define a offset for the model. Otherwise, it's attaching right on the bone. Link to comment Share on other sites More sharing options...
razorace Posted October 24, 2005 Share Posted October 24, 2005 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. Link to comment Share on other sites More sharing options...
slider Posted October 24, 2005 Share Posted October 24, 2005 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... Link to comment Share on other sites More sharing options...
Darth_Kitty Posted October 24, 2005 Share Posted October 24, 2005 Why can't he just do offsets? That seems more logical. May not be as clean but whne your coding to get something done, just to get it done in the first place, who cares. Link to comment Share on other sites More sharing options...
slider Posted October 24, 2005 Share Posted October 24, 2005 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 Link to comment Share on other sites More sharing options...
Darth_Kitty Posted October 24, 2005 Share Posted October 24, 2005 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. Link to comment Share on other sites More sharing options...
razorace Posted October 25, 2005 Share Posted October 25, 2005 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. Link to comment Share on other sites More sharing options...
Jufa Posted October 25, 2005 Share Posted October 25, 2005 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 Link to comment Share on other sites More sharing options...
Kurgan Posted October 25, 2005 Share Posted October 25, 2005 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? Then again, I've seen mods that let you shoot grappling hooks into people's a$$e$, so apparently that's possible! Link to comment Share on other sites More sharing options...
razorace Posted October 25, 2005 Share Posted October 25, 2005 do you mean visual weapon holstering? I thought it was using custom tags O.o Err, right. I meant model surface tags. Link to comment Share on other sites More sharing options...
Jufa Posted October 25, 2005 Share Posted October 25, 2005 so what are the ways to attack models to players WITHOUT altering the playermodels? (Like adding tags or so) Link to comment Share on other sites More sharing options...
razorace Posted October 25, 2005 Share Posted October 25, 2005 Inside cg_player(), add code that uses bone/tag data, offsets them, and then manually renders a model at that location. Link to comment Share on other sites More sharing options...
Darth_Kitty Posted October 25, 2005 Share Posted October 25, 2005 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? Link to comment Share on other sites More sharing options...
razorace Posted October 25, 2005 Share Posted October 25, 2005 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. Link to comment Share on other sites More sharing options...
GangsterAngel Posted October 25, 2005 Author Share Posted October 25, 2005 i want to attatch to the back hip 'BOLT' , ( like you slider ) , for client Hilts. Link to comment Share on other sites More sharing options...
Darth_Kitty Posted October 25, 2005 Share Posted October 25, 2005 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 Link to comment Share on other sites More sharing options...
GangsterAngel Posted October 26, 2005 Author Share Posted October 26, 2005 i kno i said this to u on msn , but so evryone else knows. its because you need to define "HandShotFrom" in the pers Struct. Link to comment Share on other sites More sharing options...
Jufa Posted October 26, 2005 Share Posted October 26, 2005 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)?? Link to comment Share on other sites More sharing options...
razorace Posted October 26, 2005 Share Posted October 26, 2005 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. Link to comment Share on other sites More sharing options...
Tinny Posted October 26, 2005 Share Posted October 26, 2005 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? 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 Link to comment Share on other sites More sharing options...
Kurgan Posted October 27, 2005 Share Posted October 27, 2005 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! Link to comment Share on other sites More sharing options...
Tinny Posted October 27, 2005 Share Posted October 27, 2005 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.