Control over line objects

I wish to be able to essentially draw a dot-to-dot type thing in a game I’m working on (the game isn’t actually a connect the dots game, that just seemed the easiest way to explain it).

The player would tap the screen to place a marker and then when they tap again it would make another marker and a line would be drawn between then. This is all working fine.

I then want the player to be able to drag those markers around, again working fine.

The problem is that I want the lines connected to the marker (min of 1, max of two) to also move at the same time so that they all stay connected.

Is there any way to set the position of each end of a line after it has been set? [import]uid: 5833 topic_id: 5002 reply_id: 305002[/import]

redraw the lines from scratch in your enterframe [import]uid: 6645 topic_id: 5002 reply_id: 16342[/import]

redraw the lines from scratch in your enterframe [import]uid: 6645 topic_id: 5002 reply_id: 16343[/import]

I was thinking that but thought it might be a performance hit? [import]uid: 5833 topic_id: 5002 reply_id: 16344[/import]

probably less than using maths to work out the required rotation/translation required for each line separately?

[import]uid: 6645 topic_id: 5002 reply_id: 16369[/import]

Good point :slight_smile: [import]uid: 5833 topic_id: 5002 reply_id: 16379[/import]

hey graham,

I’m going off Carlos’ suggestion here…
http://developer.anscamobile.com/forum/2010/12/15/displaylineappend-doesnt-work-realtime-unless-linewidth-set-eg-linewidth00000001

j. [import]uid: 6645 topic_id: 5002 reply_id: 16453[/import]