User Tag List

Results 1 to 5 of 5

Thread: Box2D problem

  1. #1
    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,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Question Box2D problem

    I have a problem in Box2D that I cant figure out. I am using the testbed as an example. It is in the forth frame of the testbed, the "Bullets" example I use. In the example you can steer a "cannon" with the mouse and shoot bullets at physics objects. I have stripped out all that for this problem. The problem occurs when I increase the timestep from 0.02 to 0.04 (I have added an event for this by pressing the space button)

    The thing is though that when the timestep is set to 0.04 instead of 0.02 the "cannon" object is wiggling around as crazy. I have tried to figure it out, but I still have no idea how to fix this or what is causing it :/, any ideas?
    Attached files Attached files

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,307
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Looki View Post
    Timestep is a coefficient for how much time is processed each step. Should usually be set to 1/FPS, e.g. 0.02 for 50 FPS.
    Just sayin'. I didn't look at the example, but if you didn't double the frame rate in addition to doubling the timestep, that might be causing it..

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    EdSabbath's Avatar
    Join Date
    Oct 2010
    Location
    Oklahoma, USA
    Posts
    87
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually being 0.04 step he'd need 25fps, not 100fps (0.04 sec opposed to 0.02). The reason it freaks out is because your framerate is higher than the framerate set in Box2D, so it can only handle the cannon every other frame. Either set your framerate to 25 (which would be sluggish looking! ugh) or set your Box2D step back to 0.02.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,307
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Oops! I see what you mean, EdSabbath! Sorry for the mistake! But the quote is accurate, at least.

  5. #5
    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,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    It was solved by cutting the force in half

Similar Threads

  1. Box2D problem :/
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 4th July 2012, 09:34 AM
  2. problem export swf on box2d
    By matte in forum SWF/Flash Export Module Version 2.0
    Replies: 2
    Last Post: 3rd May 2012, 03:14 PM
  3. Problem with Box2D
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 10th April 2011, 05:05 PM
  4. Box2D Chain Problem
    By DizzyDoo in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 4th May 2010, 12:20 AM
  5. Box2D rotating bat test problem
    By Bruto in forum File Archive
    Replies: 2
    Last Post: 7th December 2009, 07:02 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
  •