User Tag List

Results 1 to 3 of 3

Thread: Collision detection with mouse/touch drag?

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    May 2013
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Collision detection with mouse/touch drag?

    I'm trying to control an object by dragging the mouse (on a PC) or dragging a finger (on a smartphone). I want the object to move relative to its current position; it shouldn't snap to the position of the mouse/finger. I have managed to do this, but I am having trouble with collisions. I want the dragged object to stop when it collides with another object, yet resume dragging (on the same unbroken drag movement) if the mouse/finger starts moving in a legal direction. Do you have any thoughts on this? I've attached my dragging test. Thanks!

    Trackpad Collision Test.mfa

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    1,066
    Mentioned
    171 Post(s)
    Tagged
    0 Thread(s)
    Your way of doing it was a bit complicated for me. I rewrote it on Frame 2 in a simpler form. If you had reasons for all the complicated calculations then this won't work for you.

    But the collision works as you want it to and it might give you an idea of how to get your code to work.
    Attached files Attached files

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    May 2013
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry for the very late response. Thanks for taking a look at this!

Similar Threads

  1. Replies: 10
    Last Post: 25th May 2019, 08:26 AM
  2. Replies: 6
    Last Post: 23rd September 2018, 04:51 PM
  3. Replies: 5
    Last Post: 28th May 2017, 11:57 PM
  4. Drag and Drop Detection
    By legocacher in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 7th March 2011, 10:36 PM
  5. Mouse drag detection
    By Jinks in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 26th April 2008, 12:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •