playMaker

Author Topic: How to touch and drag a 3d object?[SOLVED]  (Read 23473 times)

Slater

  • Full Member
  • ***
  • Posts: 123
    • View Profile
Re: How to touch and drag a 3d object?[SOLVED]
« Reply #30 on: July 13, 2015, 05:11:29 PM »
So I just updated to the latest version of Unity, 5.1.1f1, and all of a sudden it doesn't work to pick an object and drag i in my apps anymore. The item I pick out of 6 disappear when I try to drag it and sometimes other objects as well just disappear. When I release the finger they items show again.

Any idea on why this happens with latest Unity version?

Slater

  • Full Member
  • ***
  • Posts: 123
    • View Profile
Re: How to touch and drag a 3d object?[SOLVED]
« Reply #31 on: July 15, 2015, 08:45:46 AM »
Jean, does it maybe have to do with the mouse 3d plane drag action and that it maybe is out of date with new changes? I haven't found anything in "my added code" that seem to create this problem. I am a bit lost here and really need this to work :P

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14684
  • Official Playmaker Support
    • View Profile
Re: How to touch and drag a 3d object?[SOLVED]
« Reply #32 on: July 15, 2015, 09:30:55 AM »
Hi,

 uhm, indeed the Physics engine is all new, but raycasting should remain working.  Can you confirm the regular sample on the matter works or is it just in your implementation?

 I'll test tomorrow anyway.

 Bye,

 Jean

Slater

  • Full Member
  • ***
  • Posts: 123
    • View Profile
Re: How to touch and drag a 3d object?[SOLVED]
« Reply #33 on: July 26, 2015, 12:38:06 PM »
Hi,

I have tried the regular sample now and it works. The problem with my implementation is in the "Drag" - state. This problem occurred with Unity 5.1.1f1 and haven't been a problem before. It has been working for 2 years.

The difference in my implementation is that I have the Camera set to Orthographic size with -50 in Z. In the Drag State I have "Set position" set to: Game object "Picked Object", Vector "Result" and then I have also Z "-40" (to lock the object to "2d") and Space "World".

It works when I run it on the computer with Unity Remote 4. But when I have it built and run it on the iPad(IL2CPP), it doesn't work.

When I grab one of the objects and drag it, it disappears. What is even more weird is that sometimes also some of the other objects disappear when I drag one of them.

Any idea on what is going on here?

Slater

  • Full Member
  • ***
  • Posts: 123
    • View Profile
Re: How to touch and drag a 3d object?[SOLVED]
« Reply #34 on: July 29, 2015, 07:33:27 AM »
Do you have any idea Jean? I think you get the same problem in your sample if you put in these values. Is there another smarter way to "lock" it to 2d?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14684
  • Official Playmaker Support
    • View Profile
Re: How to touch and drag a 3d object?[SOLVED]
« Reply #35 on: July 31, 2015, 01:47:46 AM »
Hi,

 uhm, that's very odd,I am not sure what happens. Is the example I provided as is works fine?

Bye,

 Jean

Slater

  • Full Member
  • ***
  • Posts: 123
    • View Profile
Re: How to touch and drag a 3d object?[SOLVED]
« Reply #36 on: July 31, 2015, 02:55:59 AM »
Yes. But not when adding the z -40 and orthographic.