User Tag List

Results 1 to 3 of 3

Thread: Is there a way to check if specific x,y has collision with background or active?

  1. #1
    Clicker Install Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Darkhog's Avatar
    Join Date
    Jan 2009
    Location
    /dev/null
    Posts
    417
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)

    Is there a way to check if specific x,y has collision with background or active?

    I mean, without using "detector actives", which are quite costly if you need to have many of them in a scene.

  2. #2
    Clicker Fusion 2.5 Developer

    Join Date
    Feb 2014
    Posts
    967
    Mentioned
    16 Post(s)
    Tagged
    1 Thread(s)
    i think schrodinger came up with a solution to detect collision using math instead of using detector actives. if ur lucky he'll answer here

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    well, not a proper full-round method, it's more a set of strategies

    I guess best strategy depends specifically on what you have and what you need.
    A detector can be a good way too, unless you need to check against "moving objects" (say no... )
    in that case you'd be at "overlap-delay" risk.

    You won't generally need to have X detector for X tests,
    but just 1 detector iterated through X tests, that makes things much better for Fusion.
    Fusion's builtin overlap test, if performed for "fine detection" >> against a not-squared shape, will be easily faster then math checks
    (it obviously does the math checks under the hood, but does it quicker than we can do with the expression editor)


    If you don't need "fine" detection, or if you have a simple enough shape,
    which can be defined mathematically without too much calculations
    (i.e. square, rectangle, circle, triangle is already a bit more expensive..)
    then a "point-in-polygon" math check can be a good strategy

    i.e. for square/rectangle is really quick and simple:

    Xleft <= testX
    Xright >= testX
    Ytop <= testY
    Ybottom >= testY

    Then for backdrops you can use the slightly hidden feature under:
    storyboard controls - collision mask - "is obstacle"
    that does exactly that


    (edit: of course all of this when speaking of "collisions" in the sense of detecting if a given point is within a given boundary in the given "test" moment,
    but when to perform the test or which points to test etc. is another set of strategies that I think mostly depends on the object movement, shape, etc..)

Similar Threads

  1. How to check if there's a file in a specific folder or not?
    By steakor in forum Android Export Module 2.5
    Replies: 2
    Last Post: 22nd May 2017, 07:09 AM
  2. Replies: 22
    Last Post: 29th July 2016, 04:25 AM
  3. how do you check is specific item exists in list
    By blurymind in forum Fusion 2.5
    Replies: 11
    Last Post: 21st December 2014, 02:30 PM
  4. Check if specific loop is no running?
    By ratty in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 6th January 2014, 09:44 PM
  5. Faster to run always check distance vs always check collision?
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 18th September 2013, 08:28 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
  •