I am fairly new to unity and I am playing around with it and love it so far. However I have a concern in regards to performance when there is a metric ton of collisions happening at once. say for example if you had a tower of playing cards stacked up and something happens to make the tower collapse would unity bog down or should it handle it pretty well?
Try it and tell us the results.
Tower of cards? Is it like, a realistic amount of cards or unreal? If a realistic amount, unity will handle that no prob.
I certainly will let you know once I get a prototype up and running.
Well i know some really large towers and have between 500-1000 cards in them. I was thinking at most that.
Depends on the computer it’s running on. It’ll suck on a 386, but will be just fine and dandy on some top of the line PC.
There are also some ways of achieving similar effects without needing to make a physics rig of every card.
You could make an animation of cards falling instead, similar to how Valve handled the collapsing bridge in one of the Half-Life 2 Episodes. There are a few animation packages now that come with physic animation tools. You could do it in 3D max or Softimage (with it’s ICE feature)
Record the animation and then play it inside Unity. 1 animation, no physic calculations.
Of course it will fall the same way everytime…
I have no idea, maybe you’ll get a slowdown with 1000+ cards colliding with each other, maybe not! Although, remember that when rigidbodies stop moving the go to “sleep” and stop calculating collisions until they go back into motion, so your problem is only when the tower is collapsing and all cards are falling and colliding simultaneously, then you might get low fps, but after the most card have landed the fps should go back up!
if you use box colliders and most of the stuff is not moving at all, you can get fairly high with physX.
How high depends on various factors, but generally the easiest thing is “just test it”.
it will never behave like real cards anyway (-> physical bending) so you can potentially simplify aspects
The thickness of the box collider might be the only issue for playing cards. It has to be thick enough to allow stacking and stop them intersecting each other. You wouldn’t get the same problem with a pile of bricks.