PlayMaker Help & Tips > PlayMaker Help

Move objects on screen axes

(1/2) > >>

marcos:
Hey everyone,
Just wondering how I would go about accomplishing the following:

I want to make an object move on the screen's current x and y axes with the mouse (or iOS touch) when the mouse clicks and drags (or touches and swipes).
So for example if the camera were perfectly front on, it would move on the world x and y axes, if the camera were pointing perfectly from the side it would be y and z; and if the camera were from an angle it would be a mixture of all three, but remaining 'flat' (as it were) with the screen's point of view.

Please let me know if what I just wrote made no sense at all and I'll try to clarify,
many thanks in advance.

jeanfabre:
Hi,

Before giving the right answer, Few clarifications:

 do you want to move the 3d model on its own ground ( like a character moving on the ground) or do you want to move the 3d model really in the camera axis like for example an element of an interface in 3d that you drag on screen, that would be completely independent of the 3d content itself?

 I suspect from your explanation that it's the second option, but I am not sure still.

 Bye,

 Jean

marcos:
Hi Jean,

The second one is what I'm after, though I don't want the object to follow the screen rotations itself like an interface item might (I don't think that you implied this, but just making sure). It would be an object floating in 3d space that ignores the depth from the camera when being moved around with drags or touch gestures.

I've attached an image (that I hope will work) that hopefully explains everything.

Thanks again.

MaDDoX:
Have you tried this:
https://hutonggames.fogbugz.com/default.asp?W225
https://hutonggames.fogbugz.com/default.asp?W226

Assigning the X and Y to a Vector 3 variable and performing this:
https://hutonggames.fogbugz.com/default.asp?W101

?

marcos:
Hey,

Gave that a go.
Caused the object to move forward a little bit at the start, and then move when i moved the mouse, only the object moved on its own XY axes, rather than in screen space. Also tried with Set Position and had similar results.
Will keep plugging away and see if I fluke it.

Many thanks for the input

Navigation

[0] Message Index

[#] Next page

Go to full version