Flicking An Object Question.
UberAirship
Member Posts: 10
Ok so I am trying to flick an object. I have it working for the most part but I seem to have an issue. After the first flick when you go to flick it again it flys off in a random direction. Almost like it had saved up momentum from the last flick.
Rule
Actor Event Touch Pressed
Attribute self.TouchGrounded is True
attribute self.Motion.Linear Velocity.Y = 0
Constrain Attribute self.Rotation vectorToAngle( self.Motion.Linear Velocity.X , self.Motion.Linear Velocity.Y
Change Attribute self.TouchY to self.Position.Y
Change Attribute self.TouchY to self.Position.X
Constrain Attribute self.Motion.Linear Velocity.X to 2*( game.Mouse.Position.X - self.Position.X )
Constrain Attribute self.Motion.Linear Velocity.Y to 2*( game.Mouse.Position.Y - self.Position.Y )
Rule
Actor Event Touch Pressed
Attribute self.TouchGrounded is True
attribute self.Motion.Linear Velocity.Y = 0
Constrain Attribute self.Rotation vectorToAngle( self.Motion.Linear Velocity.X , self.Motion.Linear Velocity.Y
Change Attribute self.TouchY to self.Position.Y
Change Attribute self.TouchY to self.Position.X
Constrain Attribute self.Motion.Linear Velocity.X to 2*( game.Mouse.Position.X - self.Position.X )
Constrain Attribute self.Motion.Linear Velocity.Y to 2*( game.Mouse.Position.Y - self.Position.Y )
Answers
Change Attribute self.TouchY to self.Position.X
just wondering i noticed self touch Y is position Y AND position X did u mean for that?