Touch overwrites collide problem
i have an actor that i control with touch, and i have obstacles in my scene which the actor is suppose to collide with (not bounce), but the problem is that the touch overwrites the collide rule, and i don't know how to fix it, so that when the touch controlled actor collides with the obstacle it stops/ doesn't go through it
Comments
Try putting those constrains in two rules:
Rule when touch is pressed
------Rule when touch is inside
----------Constrains
This should help because when the actor collides and you keep dragging, your finger will go outside the actor and it will stop constraining.
Maybe setup a self.Draggable boolean attribute and have the touch rules setup when touch is pressed and self.draggable is true ………….
And then have a second rule when overlap or collide with actor2 change self.draggable to false---Otherwise Change self.draggable to true.
___________________________________________________________________________________
Project Help from Tenrdrmer Click Here
GS BubbleBall Template HERE!!
Stacks Level Selection Template HERE!!
Expanding Option Menu Template HERE!!
Tenrdrmer's Menu # 3 HERE!!
Menu #4 - Level Banners HERE!!
AppSolute Entertainment on Facebook
AppSolute Entertainment on iTunes
in your draggable piece have when touch is pressed constrin attribute self position x to mouse position x, and constrain self position y to mouse position y
then have another rule in your draggable piece when actor overlaps or collides with bullet
interpolate self position x to self position x-25
and set the duration to .5
the interpolate will over ride the constrain when the overlap happens so it will push back like you want then go back to where your finger is and still be draggable
Glad to see that I'm starting to think "creatively" in GameSalad.
It seems like if your finger is on the actor, and you're dragging, if draggable is turned off while you're dragging, the touch action doesn't care, it's already working.
Maybe it has to do with my only having pressed OR inside during testing, instead of both?
Maybe I messed something up, I'll go back and check.
Hmmm. That's pretty interesting, I haven't got in to interpolate yet.
What if I don't want it to go back to where it was, and I just want it to move back, and then have to be clicked again to be dragged again? Like it was knocked out of your hand.
Thanks.
john method will prob work better. since he has a bounce built into the rules
___________________________________________________________________________________
Project Help from Tenrdrmer Click Here
GS BubbleBall Template HERE!!
Stacks Level Selection Template HERE!!
Expanding Option Menu Template HERE!!
Tenrdrmer's Menu # 3 HERE!!
Menu #4 - Level Banners HERE!!
AppSolute Entertainment on Facebook
AppSolute Entertainment on iTunes
just finished a demo for you
http://www.mediafire.com/?49cj31qcjybf0z2
I guess in the case where it stops on the other actor and can no longer be moved it wouldn't affect me anyway, as I not only have a timered change velocity backwards (which will now probably be some interpolate wizardry), but the "bullet" actor will go away for recycling.