lfnetwork.com mark read register faq members calendar

Thread: Attaching models to players
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 10-23-2005, 05:29 PM   #1
GangsterAngel
Rookie
 
GangsterAngel's Avatar
 
Join Date: May 2004
Posts: 139
Attaching models to players

im attempting to attatch a model to a client.
but i want the model to be attatched on the hip.

i am using

Code:
#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.


GangsterAngel is offline   you may: quote & reply,
Old 10-23-2005, 09:06 PM   #2
Darth_Kitty
 
Darth_Kitty's Avatar
 
Join Date: May 2002
Location: California
Posts: 471
Well, its doing what you wanted but you need to define a offset for the model. Otherwise, it's attaching right on the bone.


Change sides? I don't recall saying I was on your's.

Solid Snake
Model Pack Creator
Darth_Kitty is offline   you may: quote & reply,
Old 10-24-2005, 01:15 PM   #3
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,172
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.


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 10-24-2005, 02:25 PM   #4
Slider744
Junior Member
 
Slider744's Avatar
 
Join Date: Dec 2003
Location: France
Posts: 260
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...


******************************
Slider
JA+ MOD Author for Jedi Academy
the lastest version on

http://www.japlus.net/


******************************
Slider744 is offline   you may: quote & reply,
Old 10-24-2005, 03:00 PM   #5
Darth_Kitty
 
Darth_Kitty's Avatar
 
Join Date: May 2002
Location: California
Posts: 471
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.


Change sides? I don't recall saying I was on your's.

Solid Snake
Model Pack Creator
Darth_Kitty is offline   you may: quote & reply,
Old 10-24-2005, 03:55 PM   #6
Slider744
Junior Member
 
Slider744's Avatar
 
Join Date: Dec 2003
Location: France
Posts: 260
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


******************************
Slider
JA+ MOD Author for Jedi Academy
the lastest version on

http://www.japlus.net/


******************************
Slider744 is offline   you may: quote & reply,
Old 10-24-2005, 04:55 PM   #7
Darth_Kitty
 
Darth_Kitty's Avatar
 
Join Date: May 2002
Location: California
Posts: 471
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.


Change sides? I don't recall saying I was on your's.

Solid Snake
Model Pack Creator
Darth_Kitty is offline   you may: quote & reply,
Old 10-25-2005, 12:59 AM   #8
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,172
Quote:
Originally Posted by Slider744
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.


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 10-25-2005, 02:02 AM   #9
Jufa
Rookie
 
Join Date: Sep 2005
Posts: 72
Quote:
Originally Posted by razorace
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
Jufa is offline   you may: quote & reply,
Old 10-25-2005, 02:20 AM   #10
Kurgan
Headhunter
 
Kurgan's Avatar
 
Join Date: Nov 1997
Location: The Dawn of Time
Posts: 18,319
LFN Staff Member 10 year veteran! 
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?

http://img411.imageshack.us/img411/7463/raildet0lu.gif

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


Download JK2 maps for JA Server|BOOT CAMP!|Strategic Academy|
(JA Server: 108.178.55.189:29070)


"The Concussion Rifle is the weapon of a Jedi Knight Player, an elegant weapon, from a more civilized community." - Kyle Katarn
Kurgan is offline   you may: quote & reply,
Old 10-25-2005, 02:54 AM   #11
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,172
Quote:
Originally Posted by Jufa
do you mean visual weapon holstering? I thought it was using custom tags O.o
Err, right. I meant model surface tags.


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 10-25-2005, 04:21 AM   #12
Jufa
Rookie
 
Join Date: Sep 2005
Posts: 72
so what are the ways to attack models to players WITHOUT altering the playermodels? (Like adding tags or so)
Jufa is offline   you may: quote & reply,
Old 10-25-2005, 12:09 PM   #13
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,172
Inside cg_player(), add code that uses bone/tag data, offsets them, and then manually renders a model at that location.


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 10-25-2005, 01:39 PM   #14
Darth_Kitty
 
Darth_Kitty's Avatar
 
Join Date: May 2002
Location: California
Posts: 471
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?


Change sides? I don't recall saying I was on your's.

Solid Snake
Model Pack Creator
Darth_Kitty is offline   you may: quote & reply,
Old 10-25-2005, 05:39 PM   #15
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,172
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.


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 10-25-2005, 06:33 PM   #16
GangsterAngel
Rookie
 
GangsterAngel's Avatar
 
Join Date: May 2004
Posts: 139
i want to attatch to the back hip 'BOLT' , ( like you slider ) , for client Hilts.


GangsterAngel is offline   you may: quote & reply,
Old 10-25-2005, 06:42 PM   #17
Darth_Kitty
 
Darth_Kitty's Avatar
 
Join Date: May 2002
Location: California
Posts: 471
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


Change sides? I don't recall saying I was on your's.

Solid Snake
Model Pack Creator
Darth_Kitty is offline   you may: quote & reply,
Old 10-25-2005, 09:39 PM   #18
GangsterAngel
Rookie
 
GangsterAngel's Avatar
 
Join Date: May 2004
Posts: 139
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.


GangsterAngel is offline   you may: quote & reply,
Old 10-26-2005, 01:22 PM   #19
Jufa
Rookie
 
Join Date: Sep 2005
Posts: 72
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)??
Jufa is offline   you may: quote & reply,
Old 10-26-2005, 02:31 PM   #20
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,172
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.


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 10-26-2005, 06:18 PM   #21
Tinny
 
Tinny's Avatar
 
Join Date: Apr 2002
Posts: 1,188
Quote:
Originally Posted by Kurgan
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?

http://img411.imageshack.us/img411/7463/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


Redeemed!

An old school mod for jedi academy.
Tinny is offline   you may: quote & reply,
Old 10-27-2005, 12:12 AM   #22
Kurgan
Headhunter
 
Kurgan's Avatar
 
Join Date: Nov 1997
Location: The Dawn of Time
Posts: 18,319
LFN Staff Member 10 year veteran! 
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!


Download JK2 maps for JA Server|BOOT CAMP!|Strategic Academy|
(JA Server: 108.178.55.189:29070)


"The Concussion Rifle is the weapon of a Jedi Knight Player, an elegant weapon, from a more civilized community." - Kyle Katarn
Kurgan is offline   you may: quote & reply,
Old 10-27-2005, 06:25 PM   #23
Tinny
 
Tinny's Avatar
 
Join Date: Apr 2002
Posts: 1,188
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.


Redeemed!

An old school mod for jedi academy.
Tinny is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > JediKnight Series > Editing Central > JA Coding > Attaching models to players

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:27 AM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.