Stuck with actor movement.
jigglybean
Member Posts: 1,584
Hi all
I am needing some help how to make this work as it has been killing me for days!
I essentially want the user to be able to hold the actor(when touch is pressed) then drag the actor around the scene to shoot. Like in this example -
can anyone shed some light on how to make this work? thanks!
I am needing some help how to make this work as it has been killing me for days!
I essentially want the user to be able to hold the actor(when touch is pressed) then drag the actor around the scene to shoot. Like in this example -
can anyone shed some light on how to make this work? thanks!
Like Balls? Then click here! We've 100 coming soon
Best Answer
-
Socks London, UK.Posts: 12,822
@jigglybean
I made 2 rules . . .
You really only need 1 rule:
When touch is pressed:
Constrain self.pos X to mouse X
Constrain self.pos Y to mouse Y
Answers
Rule:
If touch is pressed
Do
whatever way you want it to go from the on screen controls that you have.
Also add the fire actor in the DO as well
Hope it helps man
I essentially want the user to be able to hold the actor(when touch is pressed) then drag the actor around the scene to shoot. Like in this example -
thanks!
Like Balls? Then click here! We've 100 coming soon
FYI -
I made 2 rules
The first one -when touch is pressed then dragged in a constrain attribute behavior and constrain attribute self position x to mouse position x
then in the second rule have when touch is pressed dragged in a constrain attribute behavior and constrain attribute self position y to mouse position y
Bingo!
Now to add the shooting
Like Balls? Then click here! We've 100 coming soon