Game Development Reference
In-Depth Information
Figure 16-16 . Import the latest SVG data with data triplets deleted into GIMP to see curve without tension handle
data
The solution to turn these non-conforming (to the sprite outline) curves into the
same collision polygon that we had before is quite simple, and you may have already
guessed what it is. Since we want straight lines between our data points, we need to
change this “ C ” to an “ L .” This will turn a curveto SVG command into a lineto SVG
command.
As you can see in Figure 16-17 , our collision polygon data is almost where we ex-
pected it to be, containing 16 data point pairs and a Z closing command to create a
16-sided collision polygon. We can remove the first duplicate data pair, reducing the
data set to 15 data point pairs, which is what we “laid down” in GIMP. Next, let's again
use our Import Path work process in GIMP, and see if we get the same square polygon
result that is shown in Figure 16-14 .
 
 
Search WWH ::




Custom Search