-
Notifications
You must be signed in to change notification settings - Fork 55
-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flash cs5 strokes(curvelines) to box2d static object. #18
Comments
You class should extend BodyShape since you don't want to use one of the prebuilt shapes in the shapes.* package. Select one of your paths, then run the "Trace Edges.jsfl" script in the script folder. This will output the points on your curve to the output panel. Then override the shapes method in your level class and call the edges(vertices:Vector.) function, passing the vertices output by the script. Looking at this... I'm surprised I never wrote any convenience method to convert the output from the "Trace Edges" script to a vector of V2s to send to the edges() function, but that should be pretty easy to write. |
Ok, see how you just drew the "ideal" points above your shape (the red line with yellow dots)? Do that in a new layer in flash, then run the "Trace Edges" script on THAT. Once you have your points you can delete the layer (or just hide it). Since the points used by flash are not necessarily the ones you want to feed to Box2D, you've got to get a little clever and guide it sometimes. |
Hi Jesses,
I have been struggling to get best approach to convert flash cs5 line drawings to box2d objects.
As per the Demo that was used base class as LineArc90, LineArc270.. etc.
I have bike racing path something like attached image, how can i divide this path to different moviclips and assign the base class to particular line (LineArc90, LineArc270).
Can't i take whole path as movieclip and assign the base class like Line or whatever.
Anyway you have done a great job. I really appriciate your great work.
Pls help me as Iam worrying about my game.
Thanks Bala
The text was updated successfully, but these errors were encountered: