Moveable objects not overlapping or moving other objects?
Hello everyone,
I am hoping someone might be able to help me with this problem. I have looked in the forums but can't find a solution. I am trying a drag and drop with boxes. I need both actors to move but when the one that is being moved touches the other it can't take its position or move it. I have put some drawing below to hopefully explain a bit more clearly.
Cheers,
aaapow




I am hoping someone might be able to help me with this problem. I have looked in the forums but can't find a solution. I am trying a drag and drop with boxes. I need both actors to move but when the one that is being moved touches the other it can't take its position or move it. I have put some drawing below to hopefully explain a bit more clearly.
Cheers,
aaapow





Comments
Cheers
firstly make it possible for only one object to be selected and active. Pretty sure you have done this already. Then have them each return their x and y to game or scene real attributes. Have the constrain to finger rule dependant of the actor not being closer x or y than the sum of half the combined x or y of both actors. If the speed of the moving actor takes it into overlapping the rule for constrain to finger will fall away and when this happens have the actor travel to the minimum allowed distance- if self x < than other actor x + ((self width+other actor width)/2) change attribute self x to other actor x + ((self width+other actor width)/2).
This will take some work to get the rule exclusions working for x and y greater and less than, but I think it would work.
I hope it helps
kipper
dno, just a wild guess