Keyboard and mouse uses inconsistent coordinate systems, resulting in incorrect movement
@walbourn is already working on this.
Since Aug 16, 2024.
Assessment
This issue has not been assessed yet.
Description
If you follow the keyboard and mouse tutorial and implement a basic first person camera, the movement is incorrect.
In this provided GIF, you can see that as i'm looking down while pressing E to move up (locally), it begins to move be down (locally). And when I press W to move forward (locally) it moves me backwards (locally).
I narrowed it down to the trigonometry calculations used to create the lookAt vector. It appears to assume that forward is +Z. This is inconsistent with the quaternion transform function used to rotate the input vector, which follows SimpleMaths convention of forward being -Z.
Looks like that tutorial needs the trig calculations rewritten and unfortunately i'm not mathy enough to know what needs to be changed and submit a pull request for it.
- Dominant language
- C++
- Stars
- 2.9k
- Forks
- 537
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 6
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/DirectXTK
-
Question about mesh bounding box center discrepancy for powerplant model in ModelLoadSDKMESH.cppOpenquestion
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Project feedbackOpen
Difficulty 5/5 Over a week Newbie friendliness 15/100
-
math proposal
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
input
Difficulty 4/5 3-5 days Newbie friendliness 35/100
All issues in microsoft/DirectXTK
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
WebAssembly/binaryen#9207 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
godotengine/godot#124139 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
ChicoState/autovalidate#195 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
petercorke/robotics-toolbox-python#709 ·
Maintainers usually reply within 2 days