Fixing the jigglies

SquareHeartSquareHeart Member, PRO Posts: 69
edited May 2012 in Working with GS (Mac)
I have a 2 player tank battle game on the boil. Between the 2 tanks are various obstacles than move when shot or pushed. Not much- but enough to feel like they're heavy - they have a fair bit of friction and drag on them.. The problem is that the blocks, once hit (I assume physics have been activated), do a little 1 to 2 pixel dance forever after.

I've tried tweaking the physics values and also tried zeroing out the Lin velocity below a certain threshold, but doesn't work. My only other thought is to turn [movable] off after a certain time after a collision has occurred - can you turn [moveable] on and off in game in such a way?

Any thoughts or other techniques much appreciated

Best Answer

  • jamie_cjamie_c ImagineLabs.rocks Posts: 5,772
    Accepted Answer
    It sounds like a problem I had once, check out my video and let me know if that helps.



    Jamie

Answers

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    I don't think you can a dust physics attributes in game time, at least you could not back in the .6s.

    Try putting on fixed rotation, that might help.
  • SquareHeartSquareHeart Member, PRO Posts: 69
    I have fixed rotation on these already. The jiggle is definitely positional rather than rotational.
  • SquareHeartSquareHeart Member, PRO Posts: 69
    thanks so much, very helpful!
    Contraining to a newXY pos seems logical -
    I'll give it a go, my only concern would be the number of active contrained actors I'd have in the scene - easy to test though.
    Would be nice to just be able to turn movable on and off *dreams*
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    Cool, I'm glad you found it helpful!

    Jamie
  • SparkyidrSparkyidr Member, PRO Posts: 2,033
    I had a similar problem with a ball flinging game I was working on. Even when I contstrained the velocities, there would always be the little jiggling around.

    I found that (during the process of figuring out if you are stopped, where you set the velocities to 0 etc) setting the drag to 0 helped this a lot.

    (just remember to set the drag back to whatever you need it to be when the movement needs to be happening)
  • part12studiospart12studios Member Posts: 620
    I know this is an old thread, but this just came out and wanted to share this with anyone looking for a great solution.. http://forums.gamesalad.com/discussion/comment/416497#Comment_416497 @ericzingeler made an elegant suggestion in a nutshell saying to have a rule that when below a certain x / y linear velocity do...

    Move behavior with:

    Move Type: stacked
    Speed: 0

    worked like a charm and way less overhead than a bunch of constraints and rules..
Sign In or Register to comment.