Getting the postion of ent_decal

Posted By: lostzac

Getting the postion of ent_decal - 03/14/13 07:03

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

Code:
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 ?
Posted By: sivan

Re: Getting the postion of ent_decal - 03/14/13 09:35

nx means the normal vector not the position. but you need there an angle.
Posted By: lostzac

Re: Getting the postion of ent_decal - 03/14/13 09:58

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
Posted By: sivan

Re: Getting the postion of ent_decal - 03/14/13 11:21

can you show the code? I'm interested in it. (normally I use c-trace for ent-decals)
Posted By: lostzac

Re: Getting the postion of ent_decal - 03/14/13 12:51

Yeah not a problem

Code:
//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;

Posted By: sivan

Re: Getting the postion of ent_decal - 03/14/13 13:03

thanks, cool, simple laugh
Posted By: lostzac

Re: Getting the postion of ent_decal - 03/14/13 13:05

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...
Posted By: sivan

Re: Getting the postion of ent_decal - 03/14/13 13:13

what humaniod mesh you need? I have Supltris and Hexagon, both include a basic human body shape, I can convert them to MDL. also can do some poly count reduction.
Posted By: lostzac

Re: Getting the postion of ent_decal - 03/14/13 13:17

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...
Posted By: gri

Re: Getting the postion of ent_decal - 03/20/13 11:33

Do you know how to move the decal between 2 vertices when the distance is large ?
Posted By: lostzac

Re: Getting the postion of ent_decal - 03/20/13 12:03

You could get the distance between the vertices and then adjust your position by that...

Not sure but vec_dist may work for that..
© 2024 lite-C Forums