3 registered members (Quad, Ayumi, AndrewAMD),
1,092
guests, and 1
spider. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Getting the postion of ent_decal
#419746
03/14/13 07:03
03/14/13 07:03
|
Joined: Jul 2005
Posts: 187
lostzac
OP
Member
|
OP
Member
Joined: Jul 2005
Posts: 187
|
I would like to place the decal on a set position...I know this can be done by setting the hit parameters...but I guess I am missing something... I thought something like this would work
CONTACT* c = ent_getvertex(Head,NULL,2305);
vec_set(hit.x,c.x);
vec_set(hit.nx,c.nx);
hit.model = NULL;
PARTICLE* p = ent_decal(Head,eyebrow,1000,hit.nx);
any pointers ?
Last edited by lostzac; 03/14/13 07:20.
John C Leutz II
|
|
|
Re: Getting the postion of ent_decal
[Re: lostzac]
#419754
03/14/13 09:35
03/14/13 09:35
|
Joined: Mar 2011
Posts: 3,150 Budapest
sivan
Expert
|
Expert
Joined: Mar 2011
Posts: 3,150
Budapest
|
nx means the normal vector not the position. but you need there an angle.
Last edited by sivan; 03/14/13 09:36.
|
|
|
Re: Getting the postion of ent_decal
[Re: sivan]
#419756
03/14/13 09:58
03/14/13 09:58
|
Joined: Jul 2005
Posts: 187
lostzac
OP
Member
|
OP
Member
Joined: Jul 2005
Posts: 187
|
Yeah I figured it out...I needed a 0 where the n.x was, and to apply the decal before i changed the rotation of the character... All good now...eyebrows show up correctly
John C Leutz II
|
|
|
Re: Getting the postion of ent_decal
[Re: sivan]
#419764
03/14/13 12:51
03/14/13 12:51
|
Joined: Jul 2005
Posts: 187
lostzac
OP
Member
|
OP
Member
Joined: Jul 2005
Posts: 187
|
Yeah not a problem
//Get the Postion of the Vertex
CONTACT* c = ent_getvertex(Head,NULL,eyeBrowRt);
//Set the hit cords by the vertex
vec_set(hit.x,c.x);
vec_set(hit.nx,c.nx);
hit.model = NULL;
//Place the Particle
PARTICLE* p = ent_decal(Head,eyeBrowRight,5,0);
p.material = mat_model;
John C Leutz II
|
|
|
Re: Getting the postion of ent_decal
[Re: sivan]
#419769
03/14/13 13:05
03/14/13 13:05
|
Joined: Jul 2005
Posts: 187
lostzac
OP
Member
|
OP
Member
Joined: Jul 2005
Posts: 187
|
no problems...If I can find someone to make me a simple humanoid mesh with a few parts and a morph or two I will post my whole system for the users...I can not release my models due to EULA...Well I will post my system anyways but be easier for people who are new to understand if they have something to reference or look at...
John C Leutz II
|
|
|
Re: Getting the postion of ent_decal
[Re: sivan]
#419771
03/14/13 13:17
03/14/13 13:17
|
Joined: Jul 2005
Posts: 187
lostzac
OP
Member
|
OP
Member
Joined: Jul 2005
Posts: 187
|
Let me finish up the few changes I am making to the morph code and I will send you a message with what I would need....That would be awesome to be able to give this to the community after all the work others have given that I have learned from...
John C Leutz II
|
|
|
Re: Getting the postion of ent_decal
[Re: lostzac]
#420133
03/20/13 11:33
03/20/13 11:33
|
Joined: Dec 2003
Posts: 1,225 germany
gri
Serious User
|
Serious User
Joined: Dec 2003
Posts: 1,225
germany
|
Do you know how to move the decal between 2 vertices when the distance is large ?
"Make a great game or kill it early" (Bruce Shelley, Ensemble Studios)
|
|
|
|