Update physac example (#168)

This commit is contained in:
Max Golubev 2025-05-03 14:41:59 -04:00 committed by GitHub
parent 67e6bf2405
commit 2df1ac470b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -25,10 +25,10 @@ SetTargetFPS(60)
while not WindowShouldClose(): while not WindowShouldClose():
# Update # Update
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
UpdatePhysics() # Update physics system
if IsKeyPressed(KEY_R): # Reset physics system if IsKeyPressed(KEY_R): # Reset physics system
ResetPhysics() ClosePhysics()
InitPhysics()
floor = CreatePhysicsBodyRectangle((SCREEN_WIDTH/2, SCREEN_HEIGHT), 500, 100, 10) floor = CreatePhysicsBodyRectangle((SCREEN_WIDTH/2, SCREEN_HEIGHT), 500, 100, 10)
floor.enabled = False floor.enabled = False