Raised This Month: $ Target: $400
 0% 

Entity mins and maxs - how to set properly


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 06-21-2011 , 05:23   Re: Entity mins and maxs - how to set properly
Reply With Quote #1


Left bottom corner is mins and top right corner is maxs.
The values are offsets from the center... example:

Code:
entity_set_size(ent, Float:{-16.0, -16.0, 0.0}, Float:{16.0, 16.0, 32.0})
A 32x32x32 cube with the origin at the bottom.
__________________
Hunter-Digital is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-21-2011 , 12:49   Re: Entity mins and maxs - how to set properly
Reply With Quote #2

Quote:
Originally Posted by Hunter-Digital View Post
A 32x32x32 cube with the origin at the bottom.
The origin is in the center of the box, not the bottom.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-21-2011 , 15:12   Re: Entity mins and maxs - how to set properly
Reply With Quote #3

If the origin is 0, 0, 0 then wouldn't it be in the center of the bottom face of the cube?
__________________
fysiks is online now
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-22-2011 , 02:06   Re: Entity mins and maxs - how to set properly
Reply With Quote #4

Quote:
Originally Posted by fysiks View Post
If the origin is 0, 0, 0 then wouldn't it be in the center of the bottom face of the cube?
No. The origin is in the center of the mins/maxs.



The origin is where those 3 lines intersect.
The blue lines indicate the maxs, and the red lines indicate the mins.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-22-2011 , 03:01   Re: Entity mins and maxs - how to set properly
Reply With Quote #5

Quote:
Originally Posted by Exolent[jNr] View Post
No. The origin is in the center of the mins/maxs.



The origin is where those 3 lines intersect.
The blue lines indicate the maxs, and the red lines indicate the mins.
So, you are saying that it's irrelevant to use -16 to 16 instead of 0 to 32.

Meaning that:

Code:
entity_set_size(ent, Float:{-16.0, -16.0, 0.0}, Float:{16.0, 16.0, 32.0})
is identical to:

Code:
entity_set_size(ent, Float:{-16.0, -16.0, -16.0}, Float:{16.0, 16.0, 16.0})
__________________
fysiks is online now
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-22-2011 , 05:03   Re: Entity mins and maxs - how to set properly
Reply With Quote #6

Quote:
Originally Posted by fysiks View Post
So, you are saying that it's irrelevant to use -16 to 16 instead of 0 to 32.

Meaning that:

Code:
entity_set_size(ent, Float:{-16.0, -16.0, 0.0}, Float:{16.0, 16.0, 32.0})
is identical to:

Code:
entity_set_size(ent, Float:{-16.0, -16.0, -16.0}, Float:{16.0, 16.0, 16.0})
It will create the same size box.
However, the origin will be on the bottom of the box since it has no mins below it.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Reply



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 23:23.


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