Simple Car

In this exercise we will make a self-propelled car with no steering – we will make a steerable, self-propelled car in a later exercise. Don’t forget to save often whenever you work with SketchyPhysics – it is not as stable as most programs. In fact it would even be a good idea to make backup copies as you go – save ‘car_a’ and then two minutes later use ‘save as to save ‘car_b’ etc so that even if SketchyPhysics crashes you will not lose too much. The problem is that if you save a version that crashes when you then run it then each time you open that invalid saved file it will always crash when you run it – it may be irreparable.

  1. Delete Susan if you like (or leave her so you can try knocking her over later on!)
  2. Make a box using the box tool in the Sketchy Solids toolbar. Note that you could also make the box using the rectangle and push/pull tools but you would then need to select the whole box (triple-click) and make it into a group so that SketchyPhysics can work with it.
  3. Make a cylinder centred on one of the bottom corners of the box, oriented like a car wheel.
  4. Copy (Ctrl+move) the wheel and place the wheel copies into each of the other three corners.
  5. For each wheel, carefully draw a diagonal line so that we can know where the centre of the wheel is (the midpoint of the diagonal) and then place a hinge at the centre of the wheel, on the wheel’s axis. It will help you draw the line if you realize that each ‘circle’ in Sketchup is actually a 16-sided polygon – be sure to draw the lines ‘endpoint to endpoint’ or ‘midpoint to midpoint’ but not ‘endpoint to midpoint’. For each hinge, place the axis of the hinge so that it points perpendicular to the wheel and away from the box. If you’re tempted to copy the hinge to save time then don’t – copying any kind of joint in SketchyPhysics makes it very likely that SketchyPhysics will crash.
  6. Erase the four lines that you used to help place the hinges correctly.
  7. Select a hinge, open the user interface (UI) and set values as follows: Min= -360° Max= 360° These are the angles that the hinge will be able to turn through (note that a bug in SketchyPhysics will stop you typing a ‘minus’ sign if any text is selected so first make sure no text is selected before typing a minus sign). Accel= 20 Accel can be thought of as a driving force for the hinge, making it rotate. The speed will not increase indefinitely because friction (damping) is also present, so it will settle at a steady speed. Damp(ing)= 20
  8. Set the properties of the other three hinges in the same way, one by one. Actually it is not really necessary to do the other three wheels – a single powered wheel is enough. If you DO choose to give power to each of the other wheels then you will need to make sure that the hinges on one side have their Accel value set to -20 (minus 20) so that all the wheels push the car in the same direction. If you set all the hinges to Accel= +20 then they will all try to turn anticlockwise which actually means that the hinges on one side will be pushing the car in the opposite direction to the hinges on the other side, so the car will not move.
  9. ‘Joint connect’ each hinge to its corresponding wheel. Select the Joint Connector tool then select the hinge then HOLD DOWN CONTROL (you will see a ‘+’ sign) and click the wheel. (You can connect the wheel to the hinge or the hinge to the wheel – the order does not matter.)
  10. Use the Select tool (the black arrow) together with the Shift key to select the box and all the hinges BUT NOT THE WHEELS and make the selection into a group (right-click> make group).
  11. Create a solid floor shape and make sure that the car is on or above the solid floor. You'll probably want to make the floor area much bigger – stop the animation, double-click the floor with the select tool to open the floor group for editing then use the push/pull tool to pull the floor sides until the floor is large.

The finished vehicle:

You should have saved you work several times already. Save your work again now and any time you are about to press the Play button and run your animation for this is the moment SketchyPhysics is most likely to crash. Then press the play button in the ‘Sketchy Physics’ toolbar. The car should drop down onto the solid floor and then propel itself forwards. You can pull the car around with the mouse to stop it falling off the floor.

To stop and reset the animation, press the reset button.

Worth trying: While the animation is running, right-click the vehicle and choose ‘camera track’ to make the camera rotate (and ONLY rotate) to follow the motion of the vehicle so the vehicle never goes out of the window. If you choose ‘camera follow’ then the camera does not rotate, it actually MOVES to keep a constant position compared to the vehicle. If you choose ‘camera clear’ then the camera is reset so that it no longer moves or rotates during the animation.

Note that in this exercise we used a ‘hinge’ as a motor rather than using the ‘motor’ joint.