mouse_ent enhancement

Posted By: pegamode

mouse_ent enhancement - 05/05/09 08:26

Hi,

If I have an entity that is for example a ladder, the mouse_ent function returns only the entity if the mouse cursor is directly on the model, but not if the mouse is between the ladder steps.
That's ok, but it would be great if the mouse_ent function could also react on the bounding box of the model for example if the BBOX flag is set.
In the case of a ladder aiming the entity would be much more easier.

Regards,
Pegamode.
Posted By: VeT

Re: mouse_ent enhancement - 05/05/09 09:31

yes, and some filters for sprites/models/flags would be also nice smile
Posted By: Dan Silverman

Re: mouse_ent enhancement - 05/05/09 16:53

I am no programmer, so I really don't know what I am talking about here, but could you not put an invisible object around the ladder to serve as the thing detected by the mouse cursor?
Posted By: Quad

Re: mouse_ent enhancement - 05/05/09 16:57

or, make a trace from camera,to 3d mouse position. traces hit bounding box.
Posted By: Rasch

Re: mouse_ent enhancement - 05/05/09 17:05

Thats an old problem which can be fixed at the moment by giving handles. It would be great if it would also check the bounding box like pega said.

even the functions

event_click, event_touch and event_release could need a function like this.
Posted By: jcl

Re: mouse_ent enhancement - 05/06/09 06:38

If the target object is behind the ladder, for what purpose do you want to click on the ladder at all?
Posted By: pegamode

Re: mouse_ent enhancement - 05/06/09 07:01

The ladder is the target object ... but a ladder is hard to aim with the mouse so it would be a great effort if mouse_ent could react on the bounding box.

@Quadraxas: that's what I did before the mouse_ent function was added, but I think the mouse_ent function should replace such a code.
Posted By: jcl

Re: mouse_ent enhancement - 05/06/09 07:54

Ok, I see. Normally the suggestion by Dan Silverman is the way to go, but an invisible object won't react on the mouse either. You have to use an object that is not invisible, but has an all-transparent texture.
Posted By: pegamode

Re: mouse_ent enhancement - 05/06/09 08:06

Yes, that would be possible to use an additional object with a transparent texture.

Now the question is could you add some extra features to the mouse_ent function so that it reacts on the BoundingBox when for example the BBOX-flag is set?
In this case I would wait until this feature is implemented (unless it would take too long :-) ). Otherwise I would have to use the workaround mentioned above.

Regards,
Pegamode
Posted By: Quad

Re: mouse_ent enhancement - 05/06/09 08:22

then another problem will arise, like what if someone wants to both use BBOX and current behavour of the mouse_ent. maybe a new mouse mode or a new mouse_ent_mode variable may work.
Posted By: pegamode

Re: mouse_ent enhancement - 05/06/09 08:48

Such cases were handled by a variable (as you mentioned) in the past.

Should be no problem.

I think it depends on how the mouse_ent function is implemented and if the changes could be done to the current code.
© 2024 lite-C Forums