Forum rules - please read before posting.

Mouse Scroll Movement

My goal is to create a 2D game, without a player, that acts like a webpage.

I'm currently stuck trying to find a way to add a mousewheel scroll function, so I can browse up and down the "webpage".

Is there a way that I will be able to do this?

Comments

  • edited 9:13AM

    Welcome to the community, @LukeWarme.

    There are a couple of ways you could go about this.

    One would be to have your webpage be a full-screen UI Canvas, so that you can use Unity's built-in ScrollWheel component that reacts to the mouse-wheel.

    The other, which would avoid the use of UI, would be to attach a custom script to your camera that moves vertically based on the mouse-wheel input. If you use the Scene Manager to create a "Stationary" camera, you can affect its position using a custom script while still having it be listed in AC's various Camera fields/Actions.

    Which approach sounds best in your situation?

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.