User Tag List

Results 1 to 10 of 10

Thread: Physics Pause

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleMac Export Module
    Game_Master's Avatar
    Join Date
    Jul 2007
    Location
    England
    Posts
    1,704
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Physics Pause

    This widget makes it easy to enable pausing with the physics movements.

    Widget:
    1. Drag the "Physics - Pause" object into your frame.
    2. For each active object that you want to be pausable, create a clone of "Pausable Active" in your frame.
    3. When you want to toggle pause, run a fastloop called "physics.togglePause" once.


    Note: angular velocity pausing now works as of CF2.5 Build 288.0 and Widget V2.mfa (I've kept the original widget up for people who aren't on build 288 yet). You can stop rotation when pausing by setting the StopRotation alterable value in "Physics - Pause" to 1.

    Demo:
    - Click to create active objects.
    - Press spacebar to toggle pause.

    Compatible with all runtimes that can use the physics movements.
    Attached files Attached files

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleMac Export Module
    Game_Master's Avatar
    Join Date
    Jul 2007
    Location
    England
    Posts
    1,704
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Fixed a bug that caused objects to keep moving when paused.

    Thanks to RhysD for spotting it.
    Attached files Attached files

  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)
    man, amazing! thanks for the example

  4. #4
    Clicker Fusion 2.5 (Steam)

    Join Date
    Jul 2014
    Posts
    92
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Does your object store floating point positions of the objects? Or does it simple turn off the physics and apply the forces which were on the objects before the pause.

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    aenever's Avatar
    Join Date
    Jun 2013
    Posts
    1,414
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    If you click the pausable active, in the properties just under Qualifier(s). There's a section called Behaviours, this one is called Pause click the ellipsis and click edit. The Widgets code is kept inside.

    As far as I can tell the widget stores the actives - Velocity (speed and linear direction) and Angular Velocity (Roational speed) as alterable values as soon as it's paused. It then sets the Linear Velocity to zero (which stops movement), keeps the angle the same and sets the Angular Velocity to zero (stops rotation).

    When the pause is taken off the pausable active's last known Velocity and Angular Velocity is restored.

  6. #6
    Clicker Fusion 2.5 (Steam)

    Join Date
    Jul 2014
    Posts
    92
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the insight aenever. I need to find a way to get float position values from objects in the physics world, looks like the widget works around this by just storing the other values.

  7. #7
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,156
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    It seems if the object is rotating it will not rotate after you unpause
    Attached files Attached files

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleMac Export Module
    Game_Master's Avatar
    Join Date
    Jul 2007
    Location
    England
    Posts
    1,704
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Outcast View Post
    It seems if the object is rotating it will not rotate after you unpause
    I know - I put that in the first post

    Sadly it's a limitation of the physics movement; I couldn't find any way to retrieve the rotation speed before pausing, so couldn't restore it when unpausing.

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS 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)
    PlasmaVoid's Avatar
    Join Date
    Jan 2015
    Location
    SoCal
    Posts
    85
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This doesnt work at all.

  10. #10
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleMac Export Module
    Game_Master's Avatar
    Join Date
    Jul 2007
    Location
    England
    Posts
    1,704
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks to CF2.5 Build 288.0, angular velocity can now be obtained thanks to a new expression, so the physics pause widget can now pause and resume the angular velocity.

    @PlasmaVoid I realise it's late to respond, but if you let me know what you think isn't working, I may be able to fix it.
    Attached files Attached files

Similar Threads

  1. Replies: 3
    Last Post: 18th January 2015, 09:05 AM
  2. Replies: 0
    Last Post: 2nd February 2014, 02:10 AM
  3. Physics question! Making AI that uses Physics Platformer/Physics Static movement
    By Krim in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 13th December 2013, 03:19 AM
  4. Replies: 10
    Last Post: 15th October 2012, 04:33 PM
  5. Possible to make some simple object fall physics without physics engine?
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 3rd March 2012, 08:56 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
  •