KaijuEngine / KaijuEngine/kaiju
Transformations activate while using fly-cam mode
- Dominant language
- Go
- Stars
- 4.7k
- Forks
- 207
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 2
Description
**Describe the bug**
If you press any transformation button (G/R/S) while using fly-cam (RMB) and object(s) selected, ~~the transformation will attempt to be activated even if that's not immediately obvious.~~ the respective transformation will begin upon releasing RMB.
- ~~Grabbing with G works right away and you begin to move your object around while rotating the camera in fly-cam mode.~~
Fixed, **however** Grab-operation will still start if you release RMB while holding G.
- ~~Rotating with R doesn't rotate the object at first, however if you're persistent and hold R for longer while looking around (moving mouse around), the camera will begin to stutter until stopped altogether. Then if you release RMB, rotation will begin.~~
This appears to be it's own different bug unrelated to transformation operations and is made into it's own separate issue: https://github.com/KaijuEngine/kaiju/issues/571. Holding R while releasing RMB will begin Rotation-operation though.
- If you move back with S while releasing the fly-cam RMB, the scaling operation for the selected object will be initiated.
**To Reproduce (updated)**
Steps to reproduce the error:
1. Select and object
2. Activate fly-cam (hold RMB)
3. Press and hold any key used for transformation (G/R/S)
4. Release RMB
5. Held transformation key will begin it's own operation (e.g. if you held S key while releasing RMB, Scaling will begin)
**To Reproduce (OLD and can be IGNORED)**
Steps to reproduce the Grabbing behavior:
1. Select an object
2. Activate fly-cam (hold RMB)
3. Press G for Grab
4. The grabbing operation begins and object is moved with your camera when moving mouse.
5. Releasing the RMB ends the fly-cam mode, but the grab operation continues.
Steps to reproduce the Rotating behavior:
1. Select an object
2. Activate fly-cam (hold RMB)
3. Press and hold R for Rotate
4. Move camera around with mouse
5. Camera movement begins to stutter after a short while until you can't move the camera anymore
6. Release RMB
7. Rotation operation is activated and object can be rotated with R
You can instead just press (not hold) R button in step 3 and skip steps 4 and 5, just pressing R while in fly-cam mode will activate rotation operation anyway.
Steps to reproduce the Scaling behavior:
1. Select an object
2. Activate fly-cam (hold RMB)
3. Move back (S)
4. Stop fly-cam (release RMB) while moving back (don't release the S button yet)
5. Fly-cam movement will stop but since you're still holding the S button, the scaling operation will activate for the selected object
**Expected behavior**
Buttons used for transformations (G/R/S) aren't listened to by the engine for the transformation operations while fly-cam is active. In other words, pressing G/R/S doesn't being their respective transformation operations while or immediately after using fly-cam.
**Screenshots**
Grabbing problem:
https://github.com/user-attachments/assets/cdea8823-453b-4ee6-80f4-bcc337d5efb7
Rotating problem:
https://github.com/user-attachments/assets/33845f0d-944d-4957-ae1d-ac678de45527
It's OK at the beginning, but briefly stutters at the very end before stopping completely.
**This is probably unrelated to Rotation operation and this problem was reported in another issue: https://github.com/KaijuEngine/kaiju/issues/571
So consider stuttering probably unrelated. However, Rotation operation starting at the end is relevant to this issue.**
The scaling problem:
https://github.com/user-attachments/assets/b104ed48-e967-4de7-9232-2c1e59542f03
It might be a bit tricky to do:
RMB down -> hold S -> RMB up -> success
**Platform**
- Manjaro Linux
- Nvidia
- Wayland
- Kaiju version: commit https://github.com/KaijuEngine/kaiju/commit/7fe23d26dea260a8f7db16390293e57b520a9bdd (latest at the moment of writing this issue)
Issue is still reproducible in a slightly different form on https://github.com/KaijuEngine/kaiju/commit/78ade003f8e0e0c998f887d95065519183751d8e
**Additional context**
Issue occurs no matter the amount of selected objects (tested with 1 and 2 objects).
Grabbing problem could be made into a feature I suppose, however at the current state it's clunky and hard to control.
Contributor guide
Assessment
This issue has not been assessed yet.