Raised This Month: $ Target: $400
 0% 

Get proper model size for creating accurate bounding box


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 03-29-2014 , 12:57   Re: Get proper model size for creating accurate bounding box
Reply With Quote #7

Quote:
Originally Posted by Arkshine View Post
Try GetModelBoundingBox or GetModelCollisionBox. (1.8.3, .inc : https://hg.alliedmods.net/amxmodx-ce...emeta.inc#l548)
Thanks, I will try that.

EDIT : Does not work, I can still run through it. Maybe it is a issue with the model?

PHP Code:
while((iEnt find_ent_by_class(iEntENTITY_TERROR_CORE))) 
            {
                
g_iTCoreEnt iEnt
                
                entity_set_model
(g_iTCoreEntCORE_MODEL)
                
entity_set_origin(g_iTCoreEntg_flTCoreOrigin); 
                
                
entity_set_float(g_iTCoreEntEV_FL_takedamage1.0); 
                
entity_set_float(g_iTCoreEntEV_FL_health2000.0); 
                
                
GetModelCollisionBox(g_iTCoreEntminsmaxs// GetModelBoundingBox did not work too.
                
entity_set_size(g_iTCoreEntminsmaxs); 
                
entity_set_int(g_iTCoreEntEV_INT_solidSOLID_BBOX); 
                
                
drop_to_floor(g_iTCoreEnt)
                
ClCMD_sm(id)
            } 
PHP Code:
if(GetModelBoundingBox(g_iTCoreEntminsmaxsModel_DefaultSize))
                    
client_print(idprint_console"%i %i %i - %i %i %i"mins[0], mins[1], mins[2], maxs[0], maxs[1], maxs[2]) 
Returns : 0 0 0 - 0 0 0
__________________

Last edited by Kia; 03-30-2014 at 08:13.
Kia is offline
 



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 06:03.


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