Get proper model size for creating accurate bounding box
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:
|
Re: Get proper model size for creating accurate bounding box
Maybe you can fix it by looking at the blockmakers codes.
|
Re: Get proper model size for creating accurate bounding box
Quote:
|
Re: Get proper model size for creating accurate bounding box
you can only make cube shaped solids
|
Re: Get proper model size for creating accurate bounding box
Well okay, but how do I get the size of my model?
|
Re: Get proper model size for creating accurate bounding box
Try GetModelBoundingBox or GetModelCollisionBox. (1.8.3, .inc : https://hg.alliedmods.net/amxmodx-ce...emeta.inc#l548)
|
Re: Get proper model size for creating accurate bounding box
Quote:
EDIT : Does not work, I can still run through it. Maybe it is a issue with the model? PHP Code:
PHP Code:
|
Re: Get proper model size for creating accurate bounding box
Bump.
|
Re: Get proper model size for creating accurate bounding box
PHP Code:
Or maybe try PHP Code:
Code:
/**And for moderators: it should be "failure", not "faillure" in @return line. |
Re: Get proper model size for creating accurate bounding box
native GetModelBoundingBox(entity, Float:mins[3], Float:maxs[3], sequence = Model_DefaultSize);
I see well Float:. @KliPPy, thanks for the typo. |
| All times are GMT -4. The time now is 06:03. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.