Porting my game "The Abandoned Planet" to console, and there are two outstanding input things I'd like to sort out:
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:
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!
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
You can use scripting to override the drag behaviour, but it's a case of calling the GetHeldObjectData function, which returns a class that lets you modify the properties / override drag input of that particular instance.
A script on the AC wiki that uses this to achieve something along these lines can be found here:
https://adventure-creator.fandom.com/wiki/Grab_a_draggable_without_holding_down_input
Awesome. Thank you for that response. I'll get working on this on Monday!