(Created page with "Karts can have a number of attachments to achieve special effects. This page describes how to add them to your kart. == Headlights == All new karts should have headlights of...")
Revision as of 01:18, 11 October 2017
Karts can have a number of attachments to achieve special effects. This page describes how to add them to your kart.
All new karts should have headlights of some sort unless it absolutely makes no sense for your kart. This doesn't mean you have to use traditional headlights—Gnu, for example, bears antique oil lanterns instead of normal headlights, which wouldn't go well with a flying carpet.
For most karts, with the exception of Gnu, the headlights are integrated into the kart model and the object specifically marked as a headlight in Blender is actually a fake light cone, since SuperTuxKart does not support real cone lights.
To add headlights, you can copy the light cone from one of the other karts in the media repo and add it to your kart where you want it. Be sure to apply the any rotation and scaling you make in object mode with Ctrl+A. You can duplicate this mesh in object mode with Shift+D. The origin of the headlight (the small yellow dot) will be the location of the actual light on the kart. You can change the origin with Ctrl+Alt+Shift+C. From here, there are two courses of action depending on the design of your kart:
If your headlights are attached to the character or an animated kart
Probably most karts will not need this special procedure. Provided that the headlights are attached to the kart and the kart does not have any special skeletal animations, the headlights will not become visibly "detached" from the kart. If, however, your kart uses special animations like Sara the Racer's bike, you will need this procedure. Most karts lean when turning via STK's built-in IPO animation which will automatically move headlights too, but for Sara the Racer, the motorbike has its own skeletal leaning animation in addition to this. Thus, if the headlight is not attached to the bike, it will become separated when turning and look ugly. The solution to this is to attach the headlight to a bone.
Select the first headlight you would like to attach