Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Commit

Permalink
Adjust player y Velocity when colliding with side of platform
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanlangston committed Dec 1, 2023
1 parent 67ac794 commit fc874bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Models/Player.zig
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ pub const Player = struct {

newVelocity = raylib.Vector2.init(
0,
if (newIsAirborne) newVelocity.y else 0,
newVelocity.y,
);

newPosition = raylib.Rectangle.init(
Expand All @@ -340,7 +340,7 @@ pub const Player = struct {

newVelocity = raylib.Vector2.init(
0,
if (newIsAirborne) newVelocity.y else 0,
newVelocity.y,
);

newPosition = raylib.Rectangle.init(
Expand Down

0 comments on commit fc874bc

Please sign in to comment.