ghreef
Member
|
skeleton definitions in ERPG2 code
Question for those of you more familiar with the ERPG2 code -
In the character.h file, there is a number of (I'll call them) skeleton nodes or bones that are defined. (HandR and HandL being two "key" ones). These are used to attached items and manage activities in the Chr.cpp file (I believe).
My question: if I create new models, in the interest of simplicity at this point, as long as I have those bones/nodes in the character's skeleton definition, I can have more that those and everything should still work - correct?
|
|
08-23-2011 05:52 PM |
|
Esenthel
Administrator
|
RE: skeleton definitions in ERPG2 code
yes, you can have more points
example code line in ERPG2:
C OrientP &head=cskel.getPoint("head");
please read comments on getPoint method
removing such lines disables requirement for such skel points
|
|
08-24-2011 01:54 PM |
|
ghreef
Member
|
RE: skeleton definitions in ERPG2 code
ok, got that working in the tutorial, but still having issues integrating in the ERPG2 code. If I have two types of characters (as opposed to ERPG2 which has all bipeds) where is the best place to manage the animations?
I think it's in the Chr.cpp file, and I think its in the animate function (Chr:animate). What I'm trying to do is select something like this:
void Chr::animate()
{
if(chr.type==CHR_HUMAN)
{
cskel.getSkelAnim("obj/chr/critter/test/biped_run.anim");
}else
{
cskel.getSkelAnim("obj/chr/critter/test/quadped_run.anim");
}
...
}
but - chr.type is failing since it's not defined. So, is this the best place to handle resetting animations based on char_type?
|
|
08-24-2011 09:02 PM |
|
Driklyn
Member
|
RE: skeleton definitions in ERPG2 code
chr.type()
(This post was last modified: 08-25-2011 05:01 AM by Driklyn.)
|
|
08-25-2011 05:00 AM |
|