i have created a wall of bricks (cubes) and i’m trying to find the right combination of mass, drag and angular drag, that it doesn’t fall over under its own weight, but can be knocked over with a canon ball.
i’ve tried brick mass from 1 to 0.1, drag and angular drag from 1 to 5.
the cannon ball is 5kg and is moving pretty fast
if i make the brick 1kg and low drag, it just falls over by its self. if i increase both drags, it stands up, but the cannon ball just bounces off.
so i tried to reduce mass on the bricks and drag in the hope of keeping it standing when not pushed, but easier to push over, but for some reason the 5kg ball is bouncing off the 0.1kg brick.
any idea how to fix my brick wall problem?
thanks
UPDATE
i just realized that my wall isn’t standing up whatever settings i use of mass, drag and adrag. my bricks are brick size .25x.1x.1
it was previously been held in place by another box collider covering the whole thing (scaffolding basically), when i remove that, it just collapses.
i also tried making my own high friction physic material (frictions=1, bouncy=0) and same, it will not stand up.
AND i just tried increasing the size of the box colliders but that didn’t help
also note that i used the ‘v’ option for vertex snap when placing the cubes so they should be perfectly touching
ANOTHER UPDATE
i tried leaving the big box colliders either side of the wall to hold it in place then added a trigger surrounding the whole thing.
so now for the wall i have this
private bool hitAlready = false;
void OnTriggerEnter()
{
if (!hitAlready )
{
hitAlready = true; // so another collision on an already collided object is ignored
Debug.Log("BrickWall OnCollisionEnter gameObject.name=" + gameObject.name);
Collider[] colList = GetComponents<Collider>();
colList[1].enabled = false;
colList[2].enabled = false;
Rigidbody[] rbList = GetComponentsInChildren<Rigidbody>();
foreach (Rigidbody rb in rbList)
{
rb.isKinematic = false;
}
}
}
so the idea is removing the scaffolding as the ball is getting close. so its kind of working, but the bricks aren’t flying away from the cannon ball, they are just collapsing. and i brought the mass of the bricks down to 0.01, so still stuck
OK< FINALLY i got something working, i increased the size of the cannon ball and now it blasts a hole and pushes the bricks out. seem like changing the mass didn’t do anything but changing the size made a big difference. but i still have no idea why the wall will not stand up by its self.