Camera Help

Post here for help and support regarding LunaLua and SMBX2's libraries and features.

Moderator: Userbase Moderators

marioSuper21
Fighter Fly
Fighter Fly
Posts: 35
Joined: Thu Jul 31, 2025 8:43 am
Pronouns: he

Camera Help

Postby marioSuper21 » Wed Aug 13, 2025 3:42 pm

Can the camera move if Misc.pause() is enabled? For example, I want to move the camera up, but nothing happens.

deice
Rocky Wrench
Rocky Wrench
Posts: 637
Joined: Fri Jul 23, 2021 7:35 am

Re: Camera Help

Postby deice » Wed Aug 13, 2025 5:04 pm

please post the full lua code you're using. it's not easy to help unless we know exactly how you're trying to move the camera

marioSuper21
Fighter Fly
Fighter Fly
Posts: 35
Joined: Thu Jul 31, 2025 8:43 am
Pronouns: he

Re: Camera Help

Postby marioSuper21 » Wed Aug 13, 2025 5:53 pm

Here is the code:

Code: Select all

local handycam = require("handycam")

local vSpeed = 0
local vEase = 0.01

function onTick()
    Misc.pause(true)
end

function onDraw()
    local cam = handycam[1]

    vSpeed = vSpeed + vEase

    cam.y = cam.y - vSpeed
    Text.print(cam.y, 100, 100)
end

deice
Rocky Wrench
Rocky Wrench
Posts: 637
Joined: Fri Jul 23, 2021 7:35 am

Re: Camera Help

Postby deice » Thu Aug 14, 2025 6:50 am

marioSuper21 wrote:
Wed Aug 13, 2025 5:53 pm
Here is the code:
you shouldn't wait for the drawing queue when calling Misc.pause() from an event like onTick, but other than that the code doesn't have any issues
if you remove the argument from Misc.pause() and the camera still refuses to move, it's possible another library you have loaded might be interfering


Return to “LunaLua Help”

Who is online

Users browsing this forum: No registered users and 21 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari