I have asked this before, but still am confused by it. On Scene 2 of https://edu.cospaces.io/WHG-GJE, the car continues to drive through the walls. Physics is turned on with the car and the walls, and the car is attached to the camera. We feel as if we have tried everything and it still doesn’t ‘bounce’ off the wall. How could we fix this? Once again, thanks for your help!
I can’t remix the space unless you make it remixable Normally, when navigating a CoSpace, you cannot walk/fly outside of the grid (shown in the Editor) because there are grid boundaries which prevent this. The environment outside of the grid doesn’t have physics applied to it. I assume you are using when key is pressed events to control the car. When you use these events to control the car, the grid boundaries don’t apply, so your car can go outside of the grid.
We also have this issue. A student wants to have the boy ‘run’ and the camera to follow when he presses the W key. However, after 1 second the boy stops moving because we can’t get the camera to continue to follow him. This is in Scene 1 of https://edu.cospaces.io/WHG-GJE. You should be able to remix it. Any thoughts?
Every time you make a change on a CoSpace, if you want to share that change, you need to click Share > Update to publish the changes. There are no CoBlocks in the CoSpace you shared, so I’m guessing this is what has happened.
However, I’m guessing you just want the camera to follow the boy? Simply attach the camera to the boy by dragging the Camera object onto the Boy in the Scene Inspector (list of objects in top-left tab) - this sets it as a child of the Boy.
Hope that helps! Let me know if you have any further questions.
I’ve fixed Scene 1. This should tell your students all they need to know about the game mechanics they want to achieve (hopefully). Get them to Remix and compare. Notice the Physics I’ve added.
Hope that helps! Let me know if you have any further queries.
There are a couple of things to do and understand:
To simplify things, I suggest putting a giant transparent cuboid around the buildings and turning on Physics for it.
You can try adding an additional collision event to the above cuboids, so if the car collides with them, the car moves back slightly.
Frame rate - if an object moves too fast it can move through other physics objects in between frames (depending on the GPU of your computer); therefore slowing down the car may help.
Adding a restrict Car rotation CoBlock will help prevent the car flipping over; however it will not stop the car being pushed out of another object.
I would recommend to implement all of the above items.
You could also play with the mass, friction and forces to achieve best results (there is a simple example in this thread)
Also, are you one of the owners of CoSpaces? I only need about 4 licenses for Monday (2 classes with about 64 total students), but it appears I can only go up to 100 licenses and nowhere in between.
HI again Geoff! I was wondering if you could help these students out. On Scene 2 and Scene 3 of https://edu.cospaces.io/RQU-QDZ they want the arrows to move up the wall. However, each time you play, they want a different arrow to move each time. For example, the red arrow will move first next game, but if you play again, the computer will choose a different arrow to move first. Whichever arrow moves first, you press the corresponding arrow key on the keyboard, which triggers another random arrow to move up the wall. you then click that corresponding key on the keyboard, triggering the 3rd arrow.