-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
Quad is static on program start. W-UP A-LEFT S-DOWN D-RIGHT
…d_map. Removed unused include, removed unused variables. Currently working on adding flags to allow diagonal movement. And stoping movement on key_release.
…ment is included.
There was a problem hiding this 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
There was a problem hiding this 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.
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; |
There was a problem hiding this comment.
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.
Quad is static on program start.
W-UP
A-LEFT
S-DOWN
D-RIGHT
Basic wall collision using Jake's prior collision.