Cars going through walls

I have asked this before, and it never seems to work. When coding cars to move through a city, when the car hits a wall/building, it goes through the structure. How do we prevent this, and have the car bounce off the wall instead? We have tried physics and it still doesnโ€™t work. Is there anyone who could quickly create a scene like this so we could see the code? Thanks!

@Kelly_Nickell, are the buildings the preset ones, or the ones from the Items list?

@Sebastian_Bailey means buildings in the city/village Environments Vs those in the Library.

If you want to use those in Environments, you must overlay transparent Cuboids and apply Physics to them.

Youโ€™re kinda restricted by the environments, and though you can hack around this, itโ€™s still difficult to get movement that feels natural for a car racing game.

1 Like

You need to enable physics on the wall/building object and fix its position.

If you move the car using movement blocks instead of using physics blocks, you can force it to go through walls. So we need to make the walls as thick as possible.

Here is the piece I created. Move the car to break through the wall if you can.

1 Like