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
Author Message
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 03-29-2014 , 10:30   Get proper model size for creating accurate bounding box
Reply With Quote #1

Hello everybody,

I want to place a model at the map and want it to take damage and execute a function when it's health under a fixed amount.
My problem is, players can go through the model and the model / entity does not take damage.
So my question is, how do I get the proper size of the model to make a accurate box?

My current code :

PHP Code:
new Floatmins[3] = {-12.0, -12.00.0 // Not accurate
new Floatmaxs[3] = { 12.012.075.0 }  // Not accurate

entity_set_model(iEntCORE_MODEL)
entity_set_origin(iEntg_flTCoreOrigin); 
                
entity_set_float(iEntEV_FL_takedamage1.0); 
entity_set_float(iEntEV_FL_health2000.0); 
        
entity_set_size(iEntminsmaxs); // Not accurate
entity_set_int(iEntEV_INT_solidSOLID_BBOX); // does not do anything? 
__________________

Last edited by Kia; 03-29-2014 at 10:30.
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