Solar2D 2025.3723 has been released

Summary


FIX:

  • #834 : Fix undefined variable named orientation when compiling on Linux.
  • #840 : Fixes for Native and new Facebook SDKs on iOS.

New:

  • #839 : iOS and MacOS 26 support.
  • #827 : Raycast works with the maskbits.
  • #837 : Adding rotate left and right on Linux.

Some notable changes


This update has improved several issues with the Linux build and added rotation support for the simulator.

For Physics raycast, mask bits are now supported to work with Collision Filtering.

physics.rayCast( fromX, fromY, toX, toY, behavior, [maskbits] )

Example:

local physics = require("physics")
physics.start()

local redBox = display.newRect(160, 240, 64, 64)
redBox:setFillColor(1, 0, 0)

physics.addBody(redBox, "static")

local blueBox = display.newRect(160, 400, 64, 64)
blueBox:setFillColor(0, 0, 1)

physics.addBody(blueBox, "static", {filter = {categoryBits = 128}})

local hits = physics.rayCast( 160, 0, 160, 480, "unsorted", 65407) -- ignore categoryBits 7 (2^7 = 128), default is 2^16 - 1

if ( hits ) then
    print( "Hit count: " .. tostring( #hits ) )

    -- Output the results
    for i,v in ipairs( hits ) do
        print( "Hit: ", i, v.object, " Position: ", v.position.x, v.position.y, " Surface normal: ", v.normal.x, v.normal.y )
    end
end


More info:

11 Likes