Fixing the jigglies
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
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_c ImagineLabs.rocks Posts: 5,772

Answers
Try putting on fixed rotation, that might help.
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
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)
Move behavior with:
Move Type: stacked
Speed: 0
worked like a charm and way less overhead than a bunch of constraints and rules..