I have asked this before, but still can’t figure it out. My student wants to attach his camera to the car and then, when driving the car, if he hits a wall, bounce off. If he hits a rock, he restarts. Why is he able to drive through both of these?
Here is the remixable link. Thanks! We always appreciate the help we receive!
1 Like
Ola tudo bem, fiz algumas correções no jogo para funcionar conforme solicitado. Qualquer dúvida estou a disposição.
Thanks!
What did you do? I can’t see the code.
Oi, tudo bem.
Eu atualizei o projeto, voce pode tentar remixar agora.
I can not remix it to check the code
Hi @Kelly_Nickell,
Here is an updated version simplifying the code on the driving scene. You can remix to take a look at the code.
You do not need to put “when” statements inside a “forever” loop. They are always active. If you turn on physics for the walls and set them to “static” as well as keeping “precise collisions” turned off, the car will stop upon hitting a wall. If you want it to bounce off the walls, you can turn up the “bounciness” dial on the car.