Remember me
You are here: HomeForumCyberix3D ForumGeneral Discussionnew twitter account.
Welcome, Guest
Username: Password: Remember me

TOPIC: How to respond to mouse when not over an object

How to respond to mouse when not over an object 8 years 5 months ago #456

Thanks for your help so far.

Is there a way to respond to a mouse click, move etc. even if the mouse isn't in contact with a particular object? I'd like to be able to click and drag the point of view, in this case to rotate around an object. This is proving tricky. Incidentally, if there's a better way to achieve this then let me know (e.g. a different way of using camera controllers).

www.gamemaker3d.com/player?pid=051999615980
(the project so far)
The administrator has disabled public write access.

How to respond to mouse when not over an object 8 years 5 months ago #457

  • ViraX
  • ViraX's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 154
  • Thank you received: 119
Hi,

make a drag n drop is not possible at the moment,
but you can do something that approaches ... (I'm wrong maybe check ! :P )

I can not go to the Editor (I'm on very low spec), but I can help by giving you a "pseudo-code".
<CUBE>
   <IF MOUSE 'mouse_down'>
      <LOOP>
         <Set 'x' = (mouse.x -450)>
      <LOOP END>
   <IF END> 
<CUBE>

Warning, the CUBE go in the opposite direction on the X axis (it's normal)
So I add a number(-450) to around this problem but it is not efficient...

You can for the different axes, it'll have to adjust every time !

you should also do an event for MOUSE_UP to release the CUBE ...

there are still a concern, the xyz axes, does not rotate along with the camera axes .
I did not find any idea to work around this problem correctly. :oops:

maybe Cyberix Team will have a better idea.

PS, continue like that !
strength to create original mechanism,
you find your ideal gameplay for your future big project. ;)
Last Edit: 8 years 5 months ago by ViraX.
The administrator has disabled public write access.
The following user(s) said Thank You: Joshua-Westbury

How to respond to mouse when not over an object 8 years 5 months ago #458

Thanks for the advice. That's going to be useful too, but actually I was looking for something simpler: how to do something when the mouse is clicked or moved, even if the mouse isn't over any object. As far as I can see, the green If Mouse --> clicked etc. only works for an object. Any ideas?
The administrator has disabled public write access.

How to respond to mouse when not over an object 8 years 5 months ago #459

Here's an update: still haven't solved the mouse problem but this should give a slightly better idea of what I'm trying to do.

www.gamemaker3d.com/player?pid=051999615980
The administrator has disabled public write access.

How to respond to mouse when not over an object 8 years 5 months ago #460

  • ViraX
  • ViraX's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 154
  • Thank you received: 119
Ooops :blush:
<PLANE *Texture_Alpha = 0  *Rotation.x = -90   *size = "larger than the field of view">
   <LOOP>
      <IF MOUSE 'mouse_down'>
         <Set 'CUBE.texture' = "Material1">
      <IF END>
   <LOOP END>
<PLANE>

<MATERIAL1>
   <Color = Blue>
<MATERIAL1>

<CUBE Color = NULL or "any color,it is only to be a difference">
<CUBE>

This approaches what you want ? ;)
Let me know.

*EDIT I just saw that you did your update at the same time I write my answer.
This works to a point, but for multi-points you can try to adjuste or create a HUD with rectangles2D.
Last Edit: 8 years 5 months ago by ViraX.
The administrator has disabled public write access.
The following user(s) said Thank You: Joshua-Westbury

How to respond to mouse when not over an object 8 years 5 months ago #461

Thanks again! Trying with a 2d rectangle now.
The administrator has disabled public write access.

How to respond to mouse when not over an object 8 years 5 months ago #465

OK the 2D rectangle worked fine, thanks for the tip. I would show you the result but having some trouble with the "publish" button...
The administrator has disabled public write access.

How to respond to mouse when not over an object 8 years 5 months ago #467

Uploaded working version with mouse rotate.
www.gamemaker3d.com/player?pid=051999615980
The administrator has disabled public write access.

How to respond to mouse when not over an object 8 years 3 months ago #611

  • Ganderoleg
  • Ganderoleg's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 115
  • Thank you received: 12
I've just seen this, it's very cool, it opens up a number of possibilities from point-based landscaping projects to point-based adventures or rpg games :)
The administrator has disabled public write access.
Time to create page: 0.088 seconds