AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Turn entity boundaries (https://forums.alliedmods.net/showthread.php?t=277236)

StSatan 01-05-2016 06:17

Turn entity boundaries
 
Hello all!

For example I created info_target entity:

Code:
        new ent = create_entity("info_target")     if(!is_valid_ent(ent))         return     g_iPropID[id] = ent     new Float:origin[3], Float:velocity[3]     entity_get_vector(id, EV_VEC_origin, origin)     origin[2] += 12.0         velocity_by_aim(id, 64, velocity)     origin[0] += velocity[0], origin[1] += velocity[1]     entity_set_string(ent, EV_SZ_classname, "test_ent")     entity_set_origin(ent, origin)     entity_set_model(ent, "models/test.mdl")     entity_set_int(ent, EV_INT_solid, SOLID_BBOX)     entity_set_int(ent, EV_INT_movetype, MOVETYPE_TOSS)     entity_set_float(ent, EV_FL_takedamage, DAMAGE_YES)     entity_set_size(ent, { -25.0, -22.0, -22.0 }, { -25.0, -22.0, -22.0 })

When I change entity EV_VEC_angles, the model turns normal, but model boundaries are hold at the start position (position when entity was created), how can I turn entity boundaries along with model?

klippy 01-05-2016 10:30

Re: Turn entity boundaries
 
You can't, because GoldSrc utilizes Axis-Aligned Bounding Boxes for collision (unless it's a brush entity, which are a part of BSP). As the name suggests, these are always axis-aligned, which means they cannot be rotated.


All times are GMT -4. The time now is 09:23.

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