User Tag List

Results 1 to 6 of 6

Thread: Physics set direction of bouncing ball to mouse position?

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    paobrasil's Avatar
    Join Date
    Apr 2012
    Location
    Rio de Janeiro, Brazil
    Posts
    1,149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Physics set direction of bouncing ball to mouse position?

    Hello again my friends...

    I have a bouncing ball physics object in middle of frame that start with none direction and speed.....

    But when I press space...I want to set speed 100 and direction to my mouse pointer position.....but I dont know how to do it....I select "set direction to.." but I dont know how to find a mouse pointer coordinate on expression.....

    I just know how to retrieve XMouse and YMouse...

    Do you know some expression that retrieves the mouse pointer position?

    Best regards my friends!

  2. #2
    Clickteam Clickteam
    Simon's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    2,723
    Mentioned
    64 Post(s)
    Tagged
    3 Thread(s)
    You need to get the angle of the mouse, relative to the ball. You can use tye advanced direction calculator extension to do this, or if you want to manually work it out, you need a bit of basic trigonometry. This will explain how:

    http://www.mathsisfun.com/sine-cosine-tangent.html

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    paobrasil's Avatar
    Join Date
    Apr 2012
    Location
    Rio de Janeiro, Brazil
    Posts
    1,149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I dont have a idea how to do this

    I can try to understand...but I dont know how to apply this on conditions/expressions...

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    paobrasil's Avatar
    Join Date
    Apr 2012
    Location
    Rio de Janeiro, Brazil
    Posts
    1,149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation

    I've tried everything without success...I cant figure it out....has been 5 days that I'm searching for the best way to shoot my bouncing ball from my object to mouse pointer position...and a 360 bouncing without randomize angles...

    I've attached the file here..it's very simple....if someone can fix this for me...I'll be very gratful...when I click with left mouse button...I just want to make my physics bouncing ball go to the mouse direction....


    And I have another little problem.....I want a perfect bounce...without randomize direction.....the default bouncing ball have the option to put this on 0.....but the physics bouncing ball dont have this....and keeps to do a different bouncing direction to the object sometimes......how can I turn it to 0 too?

    Best regards, and sorry to share my problem and take your time...

    Thanks
    Attached files Attached files

  5. #5
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    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)
    DaveC's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Australia
    Posts
    2,126
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    You're trying to use the direction (a max of 32 directions) and Fusion is getting confused.. you can't use the built in directions for 360 degree angles.

    if you wanted to use directions you could set the direction to the angle of the launcher / 11.25

    If you want 360 degrees, you need to set the ball to the angle of the launcher. You also needed to change an option in the balls movement "fixed angle"

    launchobject 2.mfa download this version here to see.

    I haven't really touched the physics objects so I'm not sure what you're talking about with the bounce randomization.. but what I do know is that the built in bouncing ball was never any good.. so it's probably not something you should aspire to.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    paobrasil's Avatar
    Join Date
    Apr 2012
    Location
    Rio de Janeiro, Brazil
    Posts
    1,149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you very much DaveC and Simon....

    The bounce randomization angle....when the object bounce...something the angle it's not exacly like it have to do....it just change....

Similar Threads

  1. Physics Bouncing Ball - deceleration 0 does not work on android
    By tom79 in forum Android Export Module 2.5
    Replies: 0
    Last Post: 6th February 2014, 05:39 PM
  2. 2.5 physics bouncing ball + platform movement hybrid
    By RedHades in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 30th December 2013, 05:11 PM
  3. Deceleration on bouncing ball (physics)
    By danjo in forum Fusion 2.5
    Replies: 8
    Last Post: 18th October 2013, 05:41 AM
  4. Physics, Bouncing Ball
    By KLiK-iT in forum Fusion 2.5
    Replies: 10
    Last Post: 8th October 2013, 11:47 AM
  5. Bouncing Ball Direction Glitch
    By NatureBit in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 19th September 2013, 06:30 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
  •