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

Invalid movement on one axis #40

Open
rokups opened this issue Nov 1, 2017 · 3 comments
Open

Invalid movement on one axis #40

rokups opened this issue Nov 1, 2017 · 3 comments

Comments

@rokups
Copy link
Contributor

rokups commented Nov 1, 2017

When dragging one gizmo axis, perpendicular mouse movement causes incorrect movement. Gif below displays how dragging vertical axis sideways moves object up and down. Other two axis do not have this problem.

video

It is not always same axis. It depends on point of view which axis misbehaves. This happens when translating or scaling. Depending on angle of view small sideways movement may cause huge changes and cause object "fly" out of the view and sometimes finding it can be tricky.

PR #33 seems to make this less of a problem i think, but does not fix it entirely. Or i may be imagining things and it was less of a problem only due to my point of view when testing. I am no longer sure.

@thekitchensink
Copy link

thekitchensink commented Nov 8, 2017

I can confirm this issue when I have my camera at (0, 0, 0), looking at (0, 0, -1) with a y-up coordinate system trying to move an object at (0, 0, -2). X-axis movement simply doesn't work in that case, but when I move the object up slightly x-axis movement goes crazy.

@thekitchensink
Copy link

The underlying issue (in my case at least) is that when you translate an object on the x-axis while the view direction is perpendicular to the plane normal, the intersection test will not give sensible results as the mouse ray is always on the plane at the camera position. The only fix that I can think of for this is to implement a different translation mode for axis-snapping that involves testing against the axis directly instead of against that plane.

@thekitchensink
Copy link

Opened up #42 to attempt to address what I think the underlying issue likely is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants