problem in creating a simple barrier with jit.phys.body

    May 13 2012 | 3:15 pm
    hello jitter experts,
    i am new to the phys objects in max 6.
    i simply want to create a barrier, which should behave like a "wall" of the worldbox.
    the barrier i have created does only work in one direction (if the sphere moves from top to bottom)
    i am a bit lost in the attribute "jungle" of the phys objects.
    perhaps someone can show me, what i am doing wrong.
    here is my example patch:

    • May 13 2012 | 8:12 pm
      you can set "@fixedtimestep 90 @maxsubsteps 4" attributes on object.
      With fixedtimestep you can increase the resolution of the simulation.
      maxsubsteps is very important,
      see in the reference...
    • May 13 2012 | 9:29 pm
      As matmat implied, you are encountering a situation where the wall is not being seen/applied. The simulation calculates body positions/velocities/etc with discrete steps. Your ball is moving so fast that it never collides with the wall during one of those steps. It just happens to calculate one step below the wall and the next step is above the wall. You can see related behavior if you mouse select the ball when it is below the wall and gentle throw it up. It will likely hit the wall and fall down.
      In addition to increasing the resolution/number of simulation steps, you could also increase the thickness of your wall so that it is more likely the ball will hit (or be within) the wall during one of those simulation steps. Or perhaps overlay a jit.phys.ghost on shared coordinates.