How to get a threshold of an area to not create a new pivot point when clicking. Thanks !

lavoiesvfxlavoiesvfx Member, PRO Posts: 51

Hi guys,
I tried to slow down the speed of my rotation when I click and hold. The problem is that when I click, it creates a new pivot point for my rotation. I want if the user click in a range area near the point that it has already done, it doesn't change the pivot's position but only slowdown the rotation speed.
Can we have a range or threshold around the existant click that does not allow to change pivot and thus slow down my rotation?
Here's an exemple !
Thanks for your time !

Answers

  • SocksSocks London, UK.Member Posts: 12,822

    @lavoiesvfx said:
    I want if the user click in a range area near the point that it has already done, it doesn't change the pivot's position but only slowdown the rotation speed.

    Use magnitude to detect the distance from the pivot point.

    When mouse button is down
    --if magnitude ( pivot point x - mouse x, pivot point y - mouse y ) is less than X
    ----then slow down
    --Otherwise move the pivot point to this new position

  • lavoiesvfxlavoiesvfx Member, PRO Posts: 51

    @Socks said:

    @lavoiesvfx said:
    I want if the user click in a range area near the point that it has already done, it doesn't change the pivot's position but only slowdown the rotation speed.

    Use magnitude to detect the distance from the pivot point.

    When mouse button is down
    --if magnitude ( pivot point x - mouse x, pivot point y - mouse y ) is less than X
    ----then slow down
    --Otherwise move the pivot point to this new position

    @Socks

    I will try and let you know if this working !

    Thanks for your time !

  • lavoiesvfxlavoiesvfx Member, PRO Posts: 51

    @lavoiesvfx said:

    @Socks said:

    @lavoiesvfx said:
    I want if the user click in a range area near the point that it has already done, it doesn't change the pivot's position but only slowdown the rotation speed.

    Use magnitude to detect the distance from the pivot point.

    When mouse button is down
    --if magnitude ( pivot point x - mouse x, pivot point y - mouse y ) is less than X
    ----then slow down
    --Otherwise move the pivot point to this new position

    @Socks

    I will try and let you know if this working !

    Thanks for your time !

    @Socks

    I have a hard time to create what you are saying in graph. Lack of knowledge :-(
    Can you explain which node I need to use for that ?
    Thanks !

Sign In or Register to comment.