Skip to content

raylib.DrawSphereEx

JoeStrout edited this page Apr 29, 2026 · 2 revisions

Draw sphere with extended parameters

Parameters

Parameter Default Value Note
centerPos
radius 1.0
rings 16
slices 16
color WHITE

Return value

None.

Notes

Example

camera = {position:[0,5,10], target:[0,0,0], up:[0,1,0], fovy:45, projection:raylib.CAMERA_PERSPECTIVE}
raylib.InitWindow 800, 600, "DrawSphereEx"
while not raylib.WindowShouldClose
    raylib.BeginDrawing
    raylib.ClearBackground raylib.RAYWHITE
    raylib.BeginMode3D camera
    raylib.DrawGrid 10, 1.0
    raylib.DrawSphereEx [0,1,0], 1.0, 8, 16, raylib.GREEN
    raylib.EndMode3D
    raylib.EndDrawing
end while
raylib.CloseWindow

Clone this wiki locally