Find Us On: Facebook Twitter Rss Feed Blog
Need To Register? Sign Up Login

Alice 2-3 Short Problem

BijayP51uma
BijayP51uma 


Create a simulation of the bumper car ride (Amusement park), where the cars move continuously around within the bumper arena. Add two bumper cars inside the arena. In this animation, each car should be moving forward a small amount until it gets too close to another car or to the wall, then turn the car a quarter of a revolution clockwise (to get a different direction) and continue moving forward. Use a switch (Controls) to stop and start the ride. As long as the switch is on, the ride should continue. Hint: To create new bumperCar object, select one of the bumperCar objects in the object tree and then click on the copy icon in the mouse control palette. Be sure to click on the white arrow mouse control icon when finished creating copies(to turn off copy) is needed. One way to check for a possible collision is to use the distance to function to compute the distance of the car to the arena. Remember that distance to is measured "center-to-center." In this world, a measurement from the center of the car to the center of the arena is exactly what you need. When a car gets too far from the center of the arena, it will collide with a wall. It is also possible to write a function that returns whether two cars are about to collide with one another. What should be one in this case? Filename: Bumpercars.a2w Car continous movement and within bumper area: Car avoiding wall or another car on and off switch Attachments
Tags
Clarifications

Answers