Forum Discussion
Drag and Drop Issue - How to disable drop targets
I found a band-aid solution which is :
1) Create a "deleted" state for your drop target and you delete the element from the scene in this state.
2) tell your drop target to switch to deleted state when your correct item is dropped inside. So your drop target will no longer display and would be disabled.
3) If your drop target had a specific shape you can tell by a trigger to display a fake drop target instead of the active one when the other one switch to deleted state.
It need more work, but in my case it is less tedious to set up.
Hope this will help you too.
- Crystal-Horn7 years agoStaff
Thank you, Gillian, for the update!
- JCBlanchard6 years agoCommunity Member
What do you mean by "Deleted" state? Do you mean Disabled?
- JasonKramer6 years agoCommunity Member
JC,
I tried the "deleted" state approach and it worked. By "deleted", is just a custom state where the actual object that was setup as the target_object is literally deleted, such that there are no actual objects in that state.
- GillianDelvigne6 years agoCommunity Member
Exactly! :)
- KevinBranaghan-6 years agoCommunity Member
Gillian, I have 3 possible drag items that are all considered correct (just can't have more than 1 in each target. How do I go about disabling the drop target if any of the 3 possible items are dropped?
- WillIllingworth10 months agoCommunity Member
Gillian Delvigne
I found a band-aid solution which is :
1) Create a "deleted" state for your drop target and you delete the element from the scene in this state.
2) tell your drop target to switch to deleted state when your correct item is dropped inside. So your drop target will no longer display and would be disabled.
3) If your drop target had a specific shape you can tell by a trigger to display a fake drop target instead of the active one when the other one switch to deleted state.
It need more work, but in my case it is less tedious to set up.
Hope this will help you too.
You know when you spend too many hours trying to figure something out by yourself?
And it just drives you more and more insane?
So you plead with yourself...
Then you read Gillian's reply.And your problems are solved.
Thank you Gillian.
🍻