simple Q, Radius Function?

skipniceskipnice Member, PRO Posts: 68

Can someone tell me how to find the radious from point " mouse button down" im sure its a simple function lol

Thanks!

Comments

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

    From mouse button down to where ?

  • grishlockgrishlock Member, PRO Posts: 32

    You can use the magnitude function to get the distance between two points.

  • MentalDonkeyGamesMentalDonkeyGames Member Posts: 1,276

    "Mouse button down" only checks if the mouse is pressed or not. You need to use "mouse position X" and "mouse position Y". Like @grishlock said, use the magnitude function.

    Mental Donkey Games
    Website - Facebook - Twitter

  • skipniceskipnice Member, PRO Posts: 68

    @NipaDidIt yep, I guess I didn't clarify. Mouse down save point, then calculate from that save point to mouse position X Y . so its just simply magnitude? No equation?

    Awesome thanks guys!

  • SocksSocks London, UK.Member Posts: 12,822
    edited October 2015

    @skipnice said:
    NipaDidIt yep, I guess I didn't clarify. Mouse down save point, then calculate from that save point to mouse position X Y . so its just simply magnitude? No equation?

    Awesome thanks guys!

    Rule - When mouse button is down
    --Change self.MouseTouchDownX to mouse position x
    --Change self.MouseTouchDownY to mouse position y

    The distance ("radius"?) from this 'touch down' point - to where the mouse currently is - would be:

    magnitude(MouseTouchDownX - mouse position x, MouseTouchDownY - mouse position y)

  • skipniceskipnice Member, PRO Posts: 68

    @Socks haha I keep saying radius cuz im looking at a circle lolol, thank you for the equation!

Sign In or Register to comment.