Forum rules - please read before posting.

Draggable Object to rotate 2D image

edited July 2023 in Technical Q&A

I'm using a Looped Curved Track and a Draggable with a child sprite to create this disc I can rotate.

2 things seem to be happening.
Firstly the area within the Sphere Collider is not all draggable, have to click and drag in quite a few areas within before finding a spot that responds.
Secondly when I do find a spot that lets me drag, often the input seems to be inverted, but find a spot opposite and changes are it will no longer be inverted. If I restrict the drag direction to "Forward Only" I still see these random inversions.

Im seeing the same issue whether the draggable Drag Mode is "Locked to Track" or set "Rotate Only" with the X and Y positions locked.

I've tested this in the Game window, running it via usb on a mobile, and building the project to a mobile, all have the same issue.

Comments

  • What is your AC version, and when locked to a track, what is the Track's Movement input mode set to?

    Are any other Colliders involved that may be blocking the mouse input?

    This may be an issue best resolved by seeing it for myself. If you can create a .unitypackage of the scene, the image, and any other assets needed by the scene, PM it to me and I'll take a look.

  • The drag inversion was resolved by switching the Movement Input to "Cursor Position" and it certainly made it run much smoother in general.

    There were some issue when the Draggable's Z rotation got to 0:
    When dragging backwards/clockwise, often the system just refuses to let the draggable be spun around past that point, and other time it will drop the draggable altogether. Disabling Move With Rigidbody removed this issue for me.

    The thing that is still giving me trouble is the draggable area still seems isolated to the outer quarter of the sphere collider, which makes it very hit or miss when trying to grab the collider.

  • I wonder if that's a case of it being too close to the camera, as you're dealing with a 3D physics system inside a 2D game, where camera distance isn't otherwise an issue.

    That's the only guess I can make, however. I'd need to see the scene for myself otherwise.

  • Ill make the .unitypackage of the scene and send it thanks.

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.