User Tag List

Results 1 to 7 of 7

Thread: Angle bounce?

  1. #1
    Clicker Fusion 2.5 Mac

    Join Date
    Dec 2008
    Posts
    264
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Angle bounce?

    Hi, I have an object that I want to bounce foward when hitting the wall. Pretty much how light work when reflecting in a mirror.

    I would like to know if there's a math for that, right now I am just adding +45° when the object bounces, which is lame I think.

    Thanks beforehand.

  2. #2
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Angle bounce?

    Change direction to (object's direction) - 16 ? Or if you're using the bouncing ball movement, just use bounce in the movement actions?

  3. #3
    Clicker Fusion 2.5 Mac

    Join Date
    Dec 2008
    Posts
    264
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Angle bounce?

    Its working as a "static" object, I am using some heavy coding here xD

  4. #4
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Angle bounce?

    I don't know the specific code to do a custom bouncing ball type movement but perhaps try that direction - 16 if I am understanding your request correctly that you want it to bounce in the exact opposite direction.

  5. #5
    No Products Registered

    Join Date
    Jun 2006
    Location
    USA
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Angle bounce?

    I have returned after five years just to help you out.

    I actually figured this out a few years ago and I uploaded the files here: http://www.multiupload.com/F8HVDT5UIS

    They're MMF 1.5 files which use extensions which may not be available for MMF2 (Angle Calculator, Maths Army Knife), so I included a screenshot of the events that matter.

  6. #6
    Clicker Fusion 2.5 Mac

    Join Date
    Dec 2008
    Posts
    264
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Angle bounce?

    Thanks a lot!

    I almost read "I came from five years into the future to help you out"

    Your help was epic!


  7. #7
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,544
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Angle bounce?

    If you want to reflect an object off a surface, you need to do a linear reflection off that, which requires you to know the normal angle of that surface. Once you know its normal angle, its very simple vector math. But while in a 3d vertex'd application, its very easy to retrieve a normal angle, in a 2d sprite'd application, its not a trivial hunt. I developed an algorithm for finding these normal angles that is quite efficient:

    http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=207486#Post2074 86

    Heres the vector math once you know that normal angle:

    http://mathworld.wolfram.com/Reflection.html


Similar Threads

  1. Bounce-Up
    By Jeff in forum iOS Released Games & Apps
    Replies: 0
    Last Post: 22nd November 2011, 01:52 PM
  2. iOS Bounce Bug
    By Keith in forum iOS Export Module Version 2.0
    Replies: 4
    Last Post: 7th September 2011, 03:52 PM
  3. is Bounce available in HWA?
    By Tuna in forum Hardware Accelerated Runtime
    Replies: 5
    Last Post: 30th July 2008, 01:38 PM
  4. Bounce
    By Guitaristinmakin in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 24th November 2007, 03:32 PM
  5. The Going Through Bounce
    By lsproc in forum The Games Factory 2 - Technical Support
    Replies: 15
    Last Post: 25th July 2006, 07:53 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
  •