How do get an actor to rotate when touched and when dragged not to rotate and follow my finger?
How do I rotate an actor without moving it, and when I drag it, it doesn't rotate? So I move the actor without rotating and when I hold it down it starts rotating. Does anybody know how to do this or is there any templates? I am currently doing this with two actors but when I spawn in the same actor, the constrain gets messed up and it becomes a mess.
Best Answer
-
ShineyGames Posts: 157
I would not worry about that now.
but there a few tutorials about recycling actors
Ive sent it
Answers
Then, if self.x is = to self.position,x
Rotate
If self.x is not equal to self.position.x, constrain to mouse.position.x
You'd want to do something similar for y
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
Rule: When touch is pressed
-- Change Attribute: self.oldX To: game.Mouse.Position.X
-- Change Attribute: self.oldY To: game.Mouse.Position.Y
-- Timer after .2 seconds
---- Change Attribute: self.distance To: magnitude( game.Mouse.Position.X - self.oldX , game.Mouse.Position.Y - self.oldY )
---- Rule: When self.distance > 5
------ Constrain Attribute: self.Position.X To: game.Mouse.Position.X
------ Constrain Attribute: self.Position.Y To: game.Mouse.Position.Y
----Otherwise:
------ Rotate
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
when you spawn a new mover the the rotate attribute no longer works.(i did a show text)
but if it did work and was not a bug.
all that would happen is everyone of the movers would turn together at the sametime.
Is this what you want?
depending on how many you need i would have them setup off screen already
and not use spawn at all
Ps $5 is not that great an incentive
Its just 1 actor that rotates when you press and stops and follow when you move
and theres no timers
what your email and i will send you it
you can spawn them as in video
Ps. I dont want paying