Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, dr_panther, Quad), 935 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Getting the postion of ent_decal #419746
03/14/13 07:03
03/14/13 07:03
Joined: Jul 2005
Posts: 187
L
lostzac Offline OP
Member
lostzac  Offline OP
Member
L

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

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 ?

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 Offline
Expert
sivan  Offline
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.

Free world editor for 3D Gamestudio: MapBuilder Editor
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
L
lostzac Offline OP
Member
lostzac  Offline OP
Member
L

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: lostzac] #419760
03/14/13 11:21
03/14/13 11:21
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
can you show the code? I'm interested in it. (normally I use c-trace for ent-decals)


Free world editor for 3D Gamestudio: MapBuilder Editor
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
L
lostzac Offline OP
Member
lostzac  Offline OP
Member
L

Joined: Jul 2005
Posts: 187
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;



John C Leutz II

Re: Getting the postion of ent_decal [Re: lostzac] #419768
03/14/13 13:03
03/14/13 13:03
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
thanks, cool, simple laugh


Free world editor for 3D Gamestudio: MapBuilder Editor
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
L
lostzac Offline OP
Member
lostzac  Offline OP
Member
L

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: lostzac] #419770
03/14/13 13:13
03/14/13 13:13
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
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.


Free world editor for 3D Gamestudio: MapBuilder Editor
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
L
lostzac Offline OP
Member
lostzac  Offline OP
Member
L

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 Offline
Serious User
gri  Offline
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)
Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1