Dragging an instantiated object

Ask for help and post bugs.

Dragging an instantiated object

Postby kosticv » Tue Jun 27, 2017 8:08 pm

I instantiate an object (prefab with particle system) and I can then drag it once i attach the circle colider and transform gesture. BUT, i need to click/tap only once, so when i press the screen -> object is instantiated and then can be dragged (without lifting the finger) is this something that is possible? I basicaly want to be able to put some objects on the screen, and as they are dragged arround, i want them to be followed by this particle system.


Tnx in advance
kosticv
 
Posts: 2
Joined: Tue Jun 27, 2017 8:03 pm

Re: Dragging an instantiated object

Postby kosticv » Tue Jun 27, 2017 8:40 pm

found my Answer, tnx community :)
kosticv
 
Posts: 2
Joined: Tue Jun 27, 2017 8:03 pm

Re: Instantiating and dragging an object from another object

Postby Seon » Sat Jul 08, 2017 12:59 pm

Hey guys, I have a different problem about this topic. I want to make an interactive periodic table. When I touch an element box in periodic table, it will instantiate an atom which refers to touched element and I will drag this specific atom to a reaction box without getting up my finger. Each element has different atom type as prefab and I want to instantiate an atom from its element. How can I do that?

Like in this video.
https://www.youtube.com/watch?v=aGsmFLCcDSw
Seon
 
Posts: 1
Joined: Sat Jul 08, 2017 12:39 pm

Re: Dragging an instantiated object

Postby ireth86 » Fri Jul 14, 2017 4:01 pm

Hello @Seon,
I just figured out that maybe you should take a look inside the Example directory of TouchScript project. The "Colors" example should fit your request, in particolar with the
Code: Select all
Cancel(cancelTouches,returnTouches)
you should be able to cancel the gesture and *to forward* its touch informations, so that a new gesture can be recognized.
I did not try it personally, though.
ireth86
 
Posts: 4
Joined: Wed Sep 28, 2016 5:55 pm

Re: Dragging an instantiated object

Postby valyard » Sun Jul 30, 2017 3:56 pm

valyard
Site Admin
 
Posts: 422
Joined: Mon Sep 08, 2014 11:57 pm


Return to Help and Bugs

Who is online

Users browsing this forum: No registered users and 1 guest