Dragging the actor based on another actor's size
Gamepenciler
Artist/Game DeveloperMember, PRO Posts: 326
I'm trying to constraint the actor moving along the touch area actor so that the touch won't be allowed outside the touch area space but I seem to made it wrong..
-What I did is I made a game attribute X and Y Pos
-I attached player actor to the X and Y Pos
-On the touch area I attached the X and Y Pos game attribute to device touch X and Y
-Then i Attach device touch X and Y to the touch area actor Width and height.. sounds confusing.
I Attached a file to better understand the problem.. What will happen is that the player should be dragged limited only in the touch area actor and it can't be dragged outside of it.
-What I did is I made a game attribute X and Y Pos
-I attached player actor to the X and Y Pos
-On the touch area I attached the X and Y Pos game attribute to device touch X and Y
-Then i Attach device touch X and Y to the touch area actor Width and height.. sounds confusing.
I Attached a file to better understand the problem.. What will happen is that the player should be dragged limited only in the touch area actor and it can't be dragged outside of it.
Artist/Game Developer / Animator at your service..
Answers
You could also try a game boolean and set it to true if the touch area is pressed inside or false if touch is outside and only move the player when its true.
Darren.
Artist/Game Developer / Animator at your service..