How to use mouse to draw a line ,then give it gravity and collition?

39 views
Skip to first unread message

梅仕杰

unread,
Mar 18, 2016, 10:26:02 AM3/18/16
to HaxeFlixel
How to use mouse to  draw a line ,then give it gravity and collition? Should use box2d?

Claudio Ficara

unread,
Mar 24, 2016, 3:29:35 PM3/24/16
to haxef...@googlegroups.com
The best you could do is using nape http://haxeflixel.com/demos/FlxNape/. Basically, you'd be creating segments when the mouse is down and moving, and they would be tied up together by joints, when you just released. Then, you can draw these lines by using the baloons example :)
Reply all
Reply to author
Forward
0 new messages