Forum rules - please read before posting.

Lock Cursor and Drag things using analogue stick

edited October 2024 in Technical Q&A

Porting my game "The Abandoned Planet" to console, and there are two outstanding input things I'd like to sort out:

Drag Camera Using Analogue Stick

There are a few scenes in the game in which you are looking through a view finder (2D camera). For PC and mobile, you click/tap and then drag. This is great. But for consoles, I want to lock the cursor in the center of the screen like a reticle, and then drag the camera using the analogue stick. (BTW, we abandoned the idea of eliminating the cursor from this thread: https://adventurecreator.org/forum/discussion/15400/cycle-through-hotspots-depending-on-active-camera#latest... too many edge cases).

Currently, if I use the Player > Constrain > Cursor Lock action, this locks the cursor. You can still drag the camera by pressing the interaction button and moving the analogue stick, but this is undesirable, since you want the cursor (which is now a reticle) to detect any hotspots the reticle passes over dynamically.

I've tried writing my own scripts to force the PlayerInput into its DragState, but with no success. Any thoughts on how to toggle the DragState off and on without having to press down the interaction button?

Here's what it currently locks like on PC:

Drag Draggables Using Analogue Stick

I also have a scene that uses the Draggable script on a 3D model... see below Youtube link. Instead of clicking and dragging, I'd like the analogue stick to simply drag the draggable, without the need to press the interaction button.

Here's what this currently looks like on PC:

I feel like these two things are related. Please let me know if any direction or assistance can be provided. Thanks!

Comments

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.