Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.0.1 #2

Merged
merged 3 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Change Log

All notable changes to this project will be documented in this file.

## [1.0.1 - 2023-10-31]

### Fixed

- Transform of mouse position with rotated capture area
2 changes: 1 addition & 1 deletion addons/control3d/plugin.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
name="Control3D"
description="This plugin allows using SubViewports to display 2D interfaces in 3D."
author="MASSHUU"
version="1.0.0"
version="1.0.1"
script="Control3DPlugin.cs"
2 changes: 1 addition & 1 deletion addons/control3d/src/Control3D.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ private void HandleMouse(InputEventMouse eventMouse)
// If the mouse is inside the panel,
// we need to convert the mouse position to the 2D world.
mousePos3D = mouseInside
? CaptureArea.GlobalTransform.AffineInverse() * new Vector3(mousePos3D.X, mousePos3D.Y, mousePos3D.Z)
? CaptureArea.GlobalTransform.AffineInverse() * mousePos3D
: new(_halfMeshSize.X, -_halfMeshSize.Y, 0);

Vector2 mousePos2D = MouseTo2DWorld(mousePos3D);
Expand Down