Draw Straght Line That Follows Your Finger
Hey guys.I was trying to make the "draw a line" TSB tutorial and it actually works very good,i would like tho to add the feature to be able to show the line while im touching the screen and not only when im releasing my finger.Any thoughts on how can i accomplish that?Thanks :>
Comments
Here goes!
Change Attribute: self.Size.Height To: 2
When mousebutton is down
-- Change Attribute: beginX To: game.Mouse.Position.X
-- Change Attribute: beginY To: game.Mouse.Position.Y
-- Constrain Attribute: self.Position.X To: ( game.Mouse.Position.X + self.beginX )/2
-- Constrain Attribute: self.Position.Y To: ( game.Mouse.Position.Y+ self.beginY )/2
-- Constrain Attribute: self.Size.Width To: magnitude( game.Mouse.Position.X - self.beginX , game.Mouse.Position.Y - self.beginY )
-- Constrain Attribute: self.Rotation To: vectorToAngle( game.Mouse.Position.X - self.beginX , game.Mouse.Position.Y - self.beginY )