User Tag List

Results 1 to 4 of 4

Thread: Phizix, Velocity/bounces decay

  1. #1
    Clickteam Clickteam
    Olivier's Avatar
    Join Date
    Jun 2006
    Posts
    3,000
    Mentioned
    9 Post(s)
    Tagged
    1 Thread(s)

    Phizix, Velocity/bounces decay

    I have tried for several hours to reproduce a specific movement without success. I'm trying to create a movement similar to the rings in Sonic the Hedgehog, when Sonic is hit and looses his rings. At each bounce the rings slow down and bounce lower.

    I really don't know which settings to use for the gravity and for the rings/walls friction/elasticity. Hell I have even checked the Chipmunk Game Dynamics docs to find some info about coefficients of friction.[crazy]
    If it is possible to achieve such a movement with Phizix, could someone be kind enough to give a clue or two?

  2. #2
    Clickteam Clickteam
    Olivier's Avatar
    Join Date
    Jun 2006
    Posts
    3,000
    Mentioned
    9 Post(s)
    Tagged
    1 Thread(s)

    Re: Phizix, Velocity/bounces decay

    Okay I was able to get bouncy rings by giving some elasticity (0.5) to both the rings and the walls. But then the rings never seem to stop "wiggling" even minutes after having landed.
    But I definitely can't get the rings to slow down, they always slide until they hit a wall.

    BTW what's the max friction/elasticity that we can set? I don't think that this is mentioned in the docs.

  3. #3
    No Products Registered

    Join Date
    Oct 2007
    Location
    MA
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Phizix, Velocity/bounces decay

    I'm using the Phizix extention for my game too. Though My game is top down so I can't use the built in gravity and thus have no "drag". I create the drag with a loop that goes through and slows down all moving physics objects by X amount based on that objects "drag" that is defined in an alterable value and that objects group.

    I feel like you should be able to get what you want without any trickery but if all else fails you could modify the values with code like above to get it to stop.

    ie..
    if ring x vol < 2 then set x vol =0

    Also try adding Dampening or uping the friction

  4. #4
    Clickteam Clickteam
    Olivier's Avatar
    Join Date
    Jun 2006
    Posts
    3,000
    Mentioned
    9 Post(s)
    Tagged
    1 Thread(s)

    Re: Phizix, Velocity/bounces decay

    Thanks for your suggestion. That's the solution I actually came up with. I'm using a loop that I called "AirFriction" (so it is clear what it does) that reduces the XVelocity of the bodies. On collision of these bodies I also reduce their XVelocity.

    As for the infinite "wiggling" I think that this is caused by the elasticity setting of the static body (walls, ground). I think I'll leave this setting to zero, and manage the bounces myself. Should work.

    Since I use this extension (2 days ago) I was never really able to take advantage of the friction/elasticity settings of the bodies (static and active) I created. I've played with these settings but the result was never satisfying to me. So my solution is to manage the velocities myself.

Similar Threads

  1. 360 grenade that bounces off of walls
    By moonyjacob in forum Multimedia Fusion 2 - Technical Support
    Replies: 12
    Last Post: 11th January 2012, 06:30 PM
  2. Phizix for Iphone (box2d and phizix)
    By iamjot in forum Extension Development
    Replies: 8
    Last Post: 6th May 2011, 08:41 AM
  3. pmo Y velocity bug
    By keokeo in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 24th November 2010, 04:51 PM
  4. PMO walls and X velocity Help
    By Atherton in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 20th October 2009, 01:44 AM
  5. Scrolling Screen Issues - Screen Bounces?
    By Vandas in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 11th June 2009, 06:01 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
  •