Skip to content

Camera3D target/rotation doesn't work properly (regression) #174

Description

@dawdmaow

System

MacOS 15.1.1
Nim 2.2.4

Code

proc main() =
  initWindow(800, 450, "Test")
  var camera = Camera3D(
    position: vec3(0, 10, 10),
    target: vec3(0, 0, 0),
    up: vec3(0, 1, 0),
    fovy: 45,
    projection: Perspective,
  )
  var cubePos = vec3(0, 0, 0)
  setTargetFPS(60)

  while not windowShouldClose():
    beginDrawing()
    block:
      clearBackground RayWhite

      beginMode3D(camera)
      block:
        drawCube(cubePos, 2, 2, 2, Red)
        drawCubeWires(cubePos, 2, 2, 2, Maroon)
        drawGrid(10, 1)
      endMode3D()

      drawText("Hello, world!", 10, 40, 20, DarkGray)

    endDrawing()

  closeWindow()

main()

Naylib 25.29.0

Image

Naylib 25.13.0

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions