User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12

Thread: how to collide with walls?

  1. #1
    No Products Registered

    Join Date
    Jul 2010
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how to collide with walls?

    So I know how to collide with the window edge but now I need to know how to collide with backdrops, im using a custom movement engine too. Thanks

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleMac Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Tisnart's Avatar
    Join Date
    Feb 2008
    Location
    On, Canada
    Posts
    1,073
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Re: how to collide with walls?

    make sure the backdrop is set to "obstacle" in the RunTime options of the backdrop properties (under Collisions > Obstacle Type)
    Then make your condition
    active(player?) collides with backdrop then do (whatever) action

  3. #3
    No Products Registered

    Join Date
    Jul 2010
    Location
    Australia
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: how to collide with walls?

    Backdrops also have built in "ladder" and "platform" movements, but considering you have a custom engine, you probably won't need to worry about those.

  4. #4
    No Products Registered

    Join Date
    Jul 2010
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: how to collide with walls?

    I actully know how to do the set obstacle part and when player collides with backdrop part but the thing im stuck on the "then do whatever part" :/

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleMac Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Tisnart's Avatar
    Join Date
    Feb 2008
    Location
    On, Canada
    Posts
    1,073
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Re: how to collide with walls?

    Well, it would depend on your custom movement.
    If it's the file of yours I downloaded before, than just reverse the movement when the player overlaps the backdrop.

    I can show you if you like?

  6. #6
    No Products Registered

    Join Date
    Jul 2010
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: how to collide with walls?

    That would be awsome

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleMac Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Tisnart's Avatar
    Join Date
    Feb 2008
    Location
    On, Canada
    Posts
    1,073
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Re: how to collide with walls?

    here ya go

  8. #8
    No Products Registered

    Join Date
    Jul 2010
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: how to collide with walls?

    Thanks man

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Eliyahu's Avatar
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: how to collide with walls?

    In gerald999's example it just reverses the movement, so you'll notice white spaces because the collision is not accurate. To get more precise collisions, you would run fastloops, moveX and moveY (or something similar) in which you move in steps of 1 pixel each, and check collisions after each step. Instead of moving 3 then checking for a collision, it would do move 1 check, move 1 check, move 1 check. Then you won't have any white space inbetween your objects.

    http://www.clickteam.com/website/usa/img/uploads/tutorials/download/fastloop_plattutorial.zip

    DavidN's platformer tutorial should have this, I suggest you look at it, because the other method isn't going to work as well in more complex games.

    -Eliyahu

  10. #10
    No Products Registered

    Join Date
    Jul 2010
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: how to collide with walls?

    thanks but the problem with that is im making a topd down shooter :[

Page 1 of 2 1 2 LastLast

Similar Threads

  1. How to get the coordinates of the two objects collide
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 12th February 2012, 09:25 PM
  2. How do I collide on different layers?
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 11th September 2011, 09:37 PM
  3. Projectiles Collide at once?
    By Pixzel in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 25th May 2011, 10:12 AM
  4. How to collide with corners?
    By MostDreaded in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 2nd January 2011, 02:56 AM
  5. How do i collide with walls?
    By MostDreaded in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 1st January 2011, 12:47 AM

Posting Permissions

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