Dragging Question
Fal01
Member Posts: 460
Hi all,
I'm making a game where you drag letters to specific places to spell a word.
When the right letter reaches it's target I want to be able disengage the ability to drag the letter.
It works when you collide/overlap the target, but kinda sticks to the side of it. I can't seem to get it to stop in the middle of the target.
Any ideas much appreciated!
I'm making a game where you drag letters to specific places to spell a word.
When the right letter reaches it's target I want to be able disengage the ability to drag the letter.
It works when you collide/overlap the target, but kinda sticks to the side of it. I can't seem to get it to stop in the middle of the target.
Any ideas much appreciated!
It’s not a bug – it’s an undocumented feature
Answers
There's a more recent thread about this issue here: https://forums.gamesalad.com/discussion/57262/drag-and-drop-something-to-a-grid#latest.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
It’s not a bug – it’s an undocumented feature
If your Letter and/or Target is quite big and the "snap" makes too much of a jump upon colliding/overlapping, then you have at least two options:
a) upon collide/overlap do a proximity calculation between Target and Letter before the "snap" happens. I.e. only "snap" when the center of the Letter is within 20pixels from the center of the Target.
b) constrain a smaller actor to the center of the Letter, same with the Target. Then put the collide/overlap "snap" logic into these smaller actors.
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com