Open supertuxkart-sourceforge-migration opened 10 years ago
Author: auria Pretty complete as of r11061
Here is a sample output :
<cannon speed="42.00" p1="1.00 -0.25 -1.00" p2="1.00 -0.25 -1.00" target-p1="1.00 -0.25 4.19" target-p2="1.00 -0.25 4.19">
<curve curvetype="bezier">
<point c="-0.072544 -1.969541 -0.217127" h1="-0.571937 -2.425529 -0.423724" h2="0.426849 -1.513554 -0.010530" />
<point c="0.699879 0.960386 0.937317" h1="0.807366 -0.033821 0.937317" h2="0.592393 1.954592 0.937317" />
<point c="-0.095440 3.196285 -0.199349" h1="0.527044 2.584494 0.288736" h2="-0.717925 3.808075 -0.687433" />
</curve>
</cannon>
Note that atm it works for bezier curves only, I didn't bother to add support for nurbs
Author: hikerstk Postponed till we have a track that uses this.
Author: hikerstk
A 'canon' is a feature that quickly moves the kart from one point of a track to another. Basic support was added in r11021. To finish the work and make it useable, we need support for this in the exporter. The idea is that artists specify two check-lines like structures: the first one the start checkline (i.e. crossing this check line will trigger the canon), the second one the line where the karts will be released (Ideally, if you trigger at the left side of the first checkline, you will arrive at the left side of the second checkline etc, allowing the user to target where they want to be when they can drive again).
1) Support in the track exporter. The following data should be added to the check structures in the scene.xml file for each canon:
Speed is the speed with which the kart should be moved (we might add acceleration/deacceleration later). p1, p2, min-height is the data for a check line (start check line, which will initiate shooting the kart). target-p1/p2 are the two end points of a line at which the kart should be end up (in 3d, not 2d as specified for the check-line). The following syntax is used to add support for an arbitrary curve (instead of a normal linear interpolation):
The curve data is basically the data structures already supported for IPOs in the exporter and STK. do we want support both for a simple linear interpolation, or only curves? Perhaps automatically add a curve for a linear interpolation automatically??
2) Once this is added, please reassign to me. The following improvements need to be added to STK:
Migrated-From: https://sourceforge.net/apps/trac/supertuxkart/ticket/600