Anonymous Login
2020-09-25 02:30 UTC

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001822OpenClonkEngine - C4Scriptpublic2016-10-29 15:37
Assigned To 
Product Version 
Target VersionFixed in Version 
Summary0001822: Forcing mouse position
DescriptionI would like to have possibility to set mouse's position on screen via script.
Attached Files




Zapper (developer)

The mouse position is not necessarily synchronized, I think. What is your usecase for this?


RiQQ (reporter)

I would like to create circle item menu, which would choose an option from the menu based on the direction where mouse was moved in. This could be done somewhat without this additional functionality, but it would come into a problem when mouse is located on the edge of screen.


Luchs (administrator)

Synchronization should not be an issue here as long as the cursor position is only written.


Zapper (developer)

But what would you want to set it to? Onscreen pixels (e.g. for HUD elements)? Landscape pixels (e.g. centered on Clonk)? Percentage of viewport (e.g. middle of screen)?


RiQQ (reporter)

I heard you get the mouse position currently as percentage to viewport, or something close to that. So i think this would be the best approach currently and would be enough for me i think, but if it would be possible to get it and set it as onscreen pixels, it would be more accurate.


Zapper (developer)

With onscreen pixels, you could not set it to the center of the viewport. With percentages you could not synchronize it with HUD positions (because those are placed in onscreen pixels).

I think right now you get the position in either ingame coordinates or in HUD coordinates. But never as a percentage


RiQQ (reporter)

For me it's not necessary to have it relative to viewport, but someone might find some use to have it relative to viewport, so it wouldn't hurt to have it that way.

Either should be enoguh for my case, onscreen pixels or relative to viewport. I would prefer onscreen pixels. If it's not too much work, you could have both, no?

-Issue History
Date Modified Username Field Change
2016-09-29 15:11 RiQQ New Issue
2016-09-29 15:11 RiQQ Tag Attached: Script
2016-10-02 15:03 Zapper Note Added: 0005436
2016-10-02 22:14 RiQQ Note Added: 0005438
2016-10-03 16:40 Luchs Note Added: 0005439
2016-10-10 08:34 Zapper Note Added: 0005443
2016-10-21 12:17 RiQQ Note Added: 0005463
2016-10-24 10:13 Zapper Note Added: 0005466
2016-10-29 15:37 RiQQ Note Added: 0005474
+Issue History