Raised This Month: $ Target: $400
 0% 

Turn entity boundaries


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
StSatan
Senior Member
Join Date: Apr 2010
Old 01-05-2016 , 06:17   Turn entity boundaries
Reply With Quote #1

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?

Last edited by StSatan; 01-05-2016 at 06:49.
StSatan is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 01-05-2016 , 10:30   Re: Turn entity boundaries
Reply With Quote #2

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.

Last edited by klippy; 01-05-2016 at 10:30.
klippy 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 09:23.


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