Is it possible to run a custom mouse cursor in a seperate thread?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By wombatTurkey
:warning: Old Version Published before Godot 3 was released.

I’ve just noticed that if you are using a custom mouse cursor, and if the game starts to lag just a bit, your cursor movement is actually delayed (it’s noticeable, but rarely, dependent on how much lag you get).

Howver, if you don’t use a custom mouse cursor image, this mouse lag doesn’t happen at all. I’m wondering if it’s possible to run that mouse cursor image update method inside a seperate thread, so it will have the same effect as the regular mouse cursor (no lag movement, even if lagging).

:bust_in_silhouette: Reply From: Zylann

Custom mouse cursors are emulated by Godot as a sprite on top of the scene, that’s why they are affected by lag. According to this issue, custom mouse pointers will be rewritten in 3.0 so they use the system’s API instead, then I guess they won’t be affected by lag anymore.
Meanwhile… don’t use custom pointers, or optimize.

I see, thanks!

wombatTurkey | 2016-07-31 02:07