Here are a few tips and tricks to creating good ground vehicles in SP3 (SketchyPhysics 3). These include how to increase traction, speed, handling, and quite a bit more.
Center of gravity (COG)
The first thing I'll teach you is how to stop tall vehicles, like buses, from tipping over when turning. This can be solved by moving the vehicle's center of gravity, or COG, for short. From the orginal version to SP3 X the COG has always been the center of the blue bounding box that appears when you click on a group. The COG can be modified by making a group on the bottom of the vehicle and moving it down so that the distance from the bottom of the vehicle to the box is the SAME as the distance from the bottom of the vehicle to the roof. Then set the box at the very bottom to 'ignore' or 'noCollision,' and you're done, with an untippable vehicle that doesn't need any gyros.
A lot of vehicles have serious problems when the speed is cranked up. One of the main known solutions is to make thrusters to produce artificial downforce. use the bodywork of the car as a thruster linked to the acceleration key, this will produce downforce when the speed is cranked up.
Note: This method may cause unwanted effects, as it will pull your vehicle around in the air a small amount, if your vehicle isn't facing exactly downwards. If you are having problems, attaching extra non-collision objects to the wheels and/ or body instead can also work.
- An alternate method is to eliminate the need for traction. Connect the wheels to your vehicle with hinges so they spin freely. Then go to the wheels that turn and add another servo EXACTLY centered in between any existing servos. Set this new servo to rotate with the wheels. You can then connect a thruster to this servo. Play around with the thruster settings and controllers a bit and you can get a car running at the required speed with no need for any traction. This method can also be used to create amphibious vehicles that will move on the water plane such as this one.
Optimizing your vehicles for better performance
A large problem suffered with using traction thrusters to push the car down is that when too much traction is applied the steering wheels start to crumble. This can be solved in two known methods:
- Decreasing the traction: if the wheels are crumbling and your vehicle is not particularly fast, then you should consider lowering the strength of the traction thrusters.
- Increasing the strength of the steering wheels: this is only recommended in high speed vehicles, because lowering the amount of traction is the best way in most cases. To do this you need to move the block holding the wheel to the car closer to its steering servo. This will increase the strength by a lot, and should stop the wheels from crumbling.
For optimizing models by reducing lag, go here: optimizing SketchyPhysics models.
The steering may also crumble on heavy vehicles or when vehicles hit the ground hard. It may also crumble if it is badly designed which is normally the case. Just go back and redo it.
Creating tank treads and conveyor belts can be a daunting task but when they work can make you proud of yourself. They also let you make more realistic tanks and create more advanced machines. You need that box to get from there to there. Sure, you could use a load of roller wheels, but isn't it more fun to use a conveyor belt? I mean, that's where all the cool factory action scenes happen in the movies right? But, anyway, here are a few pointers if you do make one:
- Try and keep length of the tread or conveyor belt to a minimum. This will reduce the number of parts and reduce lag.
- Try and use as few links as possible. Once again to reduce lag.
- Hide the physics joints layer. This hides all the hinges, etc. so there is less to display and once again this will reduce lag.
- Try and make some sort of guide to keep the tracks straight and prevent them from falling off.
- Hide any edges in the track links.
- Don't add a tread pattern to them. Although it looks cool it hardly functions and adds to lag, so its pointless.
- The actual track links are best just being square blocks. Nothing more, nothing less. An 8 sided wheel also works best for the drive wheel. But remember to set this wheel to be a 'convex hull'. Each side should also be the same size as the link for maximum performance.
- Any additional wheels should only be cylinders with the exception of the wheel furthest from the drive wheel. This should be identical to the drive wheel and helps prevent it throwing the track off.
- All these previous tips have been for making tank treads but the concept of a conveyor belt is the same. For a conveyor belt do the same as a tank tread apart from build it in the air so there's a small gap underneath for any sag in the belt. Also remember to make it so the wheels don't fall through the air or you get yourself a tank tread again. Essentially, all you need is a tank tread that stays in the air, which is basically what a conveyor belt is.