Touch issues
CaddoMoney
Member Posts: 13
I have an actor that I am trying to move when a touch is received and follow that touch when released. I have the touch tracking working, but for some reason, when I touch outside of the actor, the actor "jumps" to that new position.
My rule is Actor receives event touch is inside
Constrain Attribute: self.Position.X to game.Touches.Touch 1.X
I've also tried adding an additional rule of Actor Receives event touch is pressed thinking that the two of them would help only move the actor when touched.
It seems that there's some step that I'm just not getting.
My rule is Actor receives event touch is inside
Constrain Attribute: self.Position.X to game.Touches.Touch 1.X
I've also tried adding an additional rule of Actor Receives event touch is pressed thinking that the two of them would help only move the actor when touched.
It seems that there's some step that I'm just not getting.
Comments
Constraining the X/Y to your Touch X/Y is going to make it Appear wherever you touch. If you want it to MOVE to the location you need to use the move command.
The controls on that sound like what caddomonkey's asking for - essentially when you touch anywhere on the screen it used that point as the centre for a joystick. It's incredibly elegant but I'm not sure how you'd go about doing it in GS...
Edit - actually, reading the original post again, it sounds nothing like what I described - sorry!
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
So when touching the actor move the actor under the finger in the direction of the finger. When not touching the actor, but touching the screen, don't make the actor jump to the newly touched position on the screen.
Does that make more sense? Like I said, it's been a long week
Slightly different from what qs brought up, but that sure would be chockfull of awesome if GS could do that as well.
When touch is PRESSED
constrain self.position X(or Y) to game.touches.touch1.X(or Y)
This works perfectly for me