MASSHUU12 / godot-control-3d

This plugin allows using SubViewports to display 2D interfaces in 3D.
https://godotengine.org/asset-library/asset/2259
MIT License
11 stars 1 forks source link

fix transform of mouse position with rotated capture area #1

Closed AnthyG closed 8 months ago

AnthyG commented 8 months ago

Was kinda wondering why the third dimension for the transform was left out?

I tried using this with a rotated capture area and it did not work as expected. Adding in the z axis fixed this.

Just beware that I did not actually test the cs-Code, as I translated it to gdscript for myself ^^

Not sure about the mouse"Outside"-Part, as it only seems to be triggered when I move the mouse very fast.

MASSHUU12 commented 8 months ago

Hey, thanks for the PR and sorry you had to make one due to such a stupid oversight on my part.

The change is obviously for the better, and I'll throw it in right away.

I'm still new to gamedev and SubViewport is a bit confusing for me, so the quality of the code probably leaves a lot to be desired. If I find a moment to delve more into the Godot documentation, I'll try to improve the whole plugin.