Skip to content
New issue

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

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

Already on GitHub? # to your account

Added basic WASD movement. #27

Merged
merged 7 commits into from
Feb 16, 2024
Merged

Added basic WASD movement. #27

merged 7 commits into from
Feb 16, 2024

Conversation

A-rms
Copy link
Collaborator

@A-rms A-rms commented Jan 29, 2024

Quad is static on program start.

W-UP
A-LEFT
S-DOWN
D-RIGHT

Basic wall collision using Jake's prior collision.

Quad is static on program start.

W-UP
A-LEFT
S-DOWN
D-RIGHT
@A-rms A-rms marked this pull request as draft January 29, 2024 05:03
A-rms added 4 commits January 29, 2024 02:59
…d_map.

Removed unused include, removed unused variables.

Currently working on adding flags to allow diagonal movement. And stoping movement on key_release.
@A-rms A-rms marked this pull request as ready for review February 12, 2024 20:39
Copy link
Contributor

@swagween swagween left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

player must be initialized

Copy link
Collaborator Author

@A-rms A-rms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes made. Concerns fixed.

@A-rms A-rms merged commit 310d3b0 into main Feb 16, 2024
@A-rms A-rms deleted the Arms/Dev branch February 16, 2024 19:09
if (direction.x != 0.0f || direction.y != 0.0f) {
direction = glm::normalize(direction);
auto const displacement = direction * speed_v * dt.count();
m_physics.position += displacement;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't movement adjust the player's acceleration rather than editing the position directly? and if you don't want movement to have the same "feel" as gravity, you just need custom x-direction multipliers.

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

Successfully merging this pull request may close these issues.

3 participants