Jump to content

Zooming out the camera


MALS

Recommended Posts

Hey,

In a script I would like to zoom out the camera.

I've tried using getMouse().scrollDown(); but this method only works when input is enabled, and there seems to be no way to enable input by code.

I would like to know if this is possible without using the camera zoom widget.

Thanks in advance!

 

SOLUTION: the mouse was not focused on the game screen, to fix i just hovered the mouse over some random game object and then used getMouse().scrollDown();

Edited by MALS
  • Sad 1
Link to comment
Share on other sites

  • 1 year later...

Necrobumping this to ask a code snippet to solve this, can't find in API. Character can (rarely) at times get stuck around objects, going to try max pitch and disabling roofs to solve this, but would be useful to have a simple snippet for this. There's a class for this at

but this class is unnecessarily complicated for my use case (setting zoom to minimum value)

Edited by BigCahunaBurger
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...