Adding mouse support to ZNEAR-Flag

Posted By: MasterQ32

Adding mouse support to ZNEAR-Flag - 08/07/12 09:30

hey!
i'm currently working on a level/game editor and i need to click on an entity
so far no problem, but this entity has the ZNEAR flag set (because it's the thing which allows you to move the object, i don't know the name)
so i can see it all times, but i can't use the mouse_ent feature because it is really hard to get a position where you can actually click on the entity while it's fully visible

would it be possible to enable a behavior like ZNEAR for the mouse_ent?
So i could also click on the fully visible gizmo (view entities won't work here)

greetings and thanks in advance
felix
Posted By: the_clown

Re: Adding mouse support to ZNEAR-Flag - 08/07/12 10:24

You could just do a vec_to_screen with the gizmos position vector and check if it's somewhat near the mouse position.
Posted By: MasterQ32

Re: Adding mouse support to ZNEAR-Flag - 08/07/12 11:08

the problem: the gizmo is built out of 9 different models (x,y,z * move,rotate,scale)
so i can't just check with vec_to_screen/vec_for_screen i am near to the gizmo (because all parts have the same origin)
© 2023 lite-C Forums