Forum rules - please read before posting.

Smooth, accurate/snappy control for "Rotate Only" draggables

edited March 2022 in Technical Q&A

I have a cube that's set to Rotate Only as a draggable, but the movements are not accurate. At Rotation factor 1 it's too slow. Setting it to 0.3 speeds it up, but small cursor movements are ignored. Is there any way to make it more accurate and snappy, so that it registers even small movements/cursor drag? Damping here is set to 7. Setting it lower gives it inertia and momentum, which I don't want. Thanks

Comments

  • Behaviour will be affected by the presence, or absence, of a Rigidbody. Do you have one attached?

    Best to share your exact settings so that I can recreate the behaviour.

  • There is no rigidbody attached (that makes control even less snappy)

    Here are my settings:

    imageimage" alt="" title="" />

    This is the object that is controlled/ rotated (the big green collider - everything else is a child object) Does the scale of the collider/ object affect level of control as well?

    imageimage" alt="" title="" />

  • Does the scale of the collider/ object affect level of control as well?

    Not so much the scale, but the distance between the "drag point", which is on the surface of the collider, and the object's centre, will.

    What are your AC/Unity versions, and can you share your full Settings Manager?

  • Not so much the scale, but the distance between the "drag point", which is on the surface of the collider, and the object's centre, will.

    Ah then this could be an issue, as the collider is so large.

    AC
    Unity 2020.3.1

  • Sorry - also here's the Settings Manager as requested.

    image
    image
    image
    image
    picture host

  • Raising the "Damping factor" should prevent the "slippery" feeling - though you'll need to reduce the "Max speed" to compensate.

    Try values of e.g. 20 and 2 respectively.

  • It's not a slippery feeling, these values in fact make it even harder to move the cube.

    It's like I move the mouse 5 "units" but 2 of those units are ignored. The cube only moves after moving the mouse for a bit, as if it's stuck or it's too heavy. it's not 1:1 mouse and cube movement (not super responsive) Even with high speed value. I'm guessing it might be because of that box collider distance from the center situation.

    Hopefully this is visible in this video - https://imgur.com/uxWJCYc
    The small cursor movements are ignored, until it finally becomes unstuck and starts responding and rotates. Maybe this is too much accuracy than the system is built for? In that case I could just keep it this way, it's not terrible but more responsive would definitely feel better.

  • Thanks for the details.

    I suspect this isn't down to the size of the collider, but the fact that the system works by measuring the change in mouse position per-frame, rather than since the drag begins. If the mouse moves too slowly, that may cause the applied force to be too small to be noticeable.

    I'll have a think to see if this can be modified via an additional option.

  • Okay, thanks for considering looking into it! I'll stick with the current setup for now then.

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.