Need some serious constrain help! Happy Holidays Everybody!
Time
Member Posts: 113
I have a big block and constrained to it a smaller block- when dragging the big block- it drags with the smaller block(which is what I want), then when I press the small block it rotates it with the big block (which is what I want) but how can I have two big block actors in one scene, I did when I press one block I got the small block to go on that specific big block but when I click the smaller block it rotates both of them- how can I do it to only rotates one that is tapped on? I can send someone my work- please just help me!
Also happy holidays everybody!
Also happy holidays everybody!
Comments
If you can make the question as clear as you can I am sure someone will be able to help you with the logic.
Yep, I remember your issue from before. Both actors are constrained to the same attribute.
Make another attribute and constrain that to your main attribute, and use that for your second big block; otherwise they're both attracted to the same attribute.
It's pretty simple once you realize this
Hope this helps, and that it works
Chakku
One way to resolve this would be to check the distance (magnitude) of the game.mouse.position.X and Y from the big block actor and only run its rotation rules when the mouse is a less than a certain distance from it. That way, if you clicked/tapped in one area of the screen, the other big block actors that were farther away wouldn't rotate.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
There's also a set of constrains just above that. Add this rule to them:
That works for one small actor as long as you don't drag outside of one big actor and into another.
Whose template is that?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User