Raised This Month: $ Target: $400
 0% 

entity_set_size() Help / Model Solidification


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 02-26-2007 , 11:49   entity_set_size() Help / Model Solidification
Reply With Quote #1

Hmm I've been having issues with figuring out how the entity_set_size function works, and why there are two sets of coordinates.

Well...I just don't know what each x,y,z is used for so I ripped the function out of the source....and I'm still stuck...

Now...I just don't understand WHY there are two sets of coords, and HOW they work...I've played around with them for at least a few hours and I'm still baffled.

Now I have a theory....Tell me if I'm right or wrong...
Is one set of origins for the size, then the other set for the angles its placed in at?
-------

Second issue...I even PM'd Bailopan to try and figure this out, but for some reason, when you set a bounding box with this function, it keep the location the same always. The angle never changed and I'm stuck as to why it never changes...

Here's the code I was using:
Code:
    new Float:angles[3]     angles[0] = 0.0     angles[1] = float(angle)     angles[2] = 0.0     new Float:mins[3] = {-75.0 , -60.0 , -32.0}     new Float:maxs[3] = {60.0 , 60.0 , 32.0}     entity_set_size(storecar,mins,maxs)         entity_set_vector(storecar,EV_VEC_angles,angles)

The angle is set on the model of the ent, but not the bounding box. Do you think my theory comes into play?
-------


Any help would be appreciated.

Thanks.

Code:
static cell AMX_NATIVE_CALL entity_set_size(AMX *amx, cell *params)
{
	int iEnt = params[1];

	CHECK_ENTITY_SIMPLE(iEnt);
	
	edict_t *pEnt = INDEXENT2(iEnt);

	cell *cMin = MF_GetAmxAddr(amx, params[2]);
	REAL x1 = amx_ctof(cMin[0]);
	REAL y1 = amx_ctof(cMin[1]);
	REAL z1 = amx_ctof(cMin[2]);
	Vector vMin = Vector(x1, y1, z1);

	cell *cMax = MF_GetAmxAddr(amx, params[3]);
	REAL x2 = amx_ctof(cMax[0]);
	REAL y2 = amx_ctof(cMax[1]);
	REAL z2 = amx_ctof(cMax[2]);
	Vector vMax = Vector(x2, y2, z2);

	UTIL_SetSize(pEnt, vMin, vMax);

	return 1;
}
__________________


Last edited by mysticssjgoku4; 02-26-2007 at 11:51.
mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
 



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 On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:40.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode