Help needed! Move an Instantiated object!

Ask for help and post bugs.

Help needed! Move an Instantiated object!

Postby 7ono » Fri Mar 09, 2018 6:38 pm

Hi all, first time TouchScript user here!

I've seen similar problems in this forum being solved in the past and I've tried to use the answers provided there, but with no success.

I'm building a game that requires objects to spawn at a touch and then be moved by that same touch.

Currently I am calling the Instantiate in a method from the TouchManager using Unity Events and 'On Pointers Press' which works.
The Object is destroyed 'On Pointers Release' after 2 seconds.
However, I have to make a second 'touch' to grab the object, which then spawns another object.

My question is this:
How can I set the instantiated object's position to the position of the touchscript gesture/pointer for it's lifetime?

My thought is to create a new Vector3 to handle the Pointer position and use that as the position parameter for the Instantiate, am I on the right track here?

Any help would be greatly appreciated,
Posts: 1
Joined: Fri Feb 23, 2018 10:44 am

Return to Help and Bugs

Who is online

Users browsing this forum: No registered users and 6 guests