How to convert coordinate

i describe my problems:i create a cube with the LineRenderer attached,i use the SetPosition() to define the line’s startPosition(0,0,0) and endPosition(0,4,0).then,i use the stylus to grab another cube,the distance between this cube and(0,4,0) is 4+_0.2,i want to know whether ZCore .cs having functions like ScreenToWorldPoint. my unity version is 5.1.0f3.Also,i want to know which the coordinate do the grabObject use.
thank for your help.

Hi Yuqiang,

Since your Unity version is 5.1, does that mean that you’re using zCore 4.0, or are you using 5.0?

Either way, zCore doesn’t have a ScreenToWorldPoint method, but it shouldn’t need one since the cameras zCore uses already have ScreenToWorldPoint methods.

Grabbing objects with the stylus shouldn’t require the use of ScreenToWorldPoint. I recommend studying the grab sample included inside the zCore package to understand how to achieve this.

Alex S.

Thank you Alex.our project has a requirement: drag an Object by it’s axis.however zSpace and unity editor can’t complete this requirement.Objects can only be dragged by axis with unity world Space.

Hi Yuquiang,

The grab/drag sample included with zCore is only a demonstration and not intended to supply all of a project’s stylus interaction needs as-is. Developing a drag behavior that is constrained to a single axis is entirely possible. Exactly how will depend on your project.

Alex S.

thank you ,Alex.i will search methods to Drag an Object by it’s single axis .