2D x space vs 3D x space:the true nature of virtual space in Codea

In 2d space, what you work in by default you have 0 to 494 in portrait orientation
to work with as far as the visible horizontal x axis is concerned.

When you create 3D space however in portrait orientation those same
horizontal restrictions din’t apply. Instead with:

camera(0,CamHeight,300, 0,0,0, 0,1,0)

you have by default -90 to 90 on the horizontal x axis.

In the 3D lab demo they use:

camera(0,CamHeight,-300, 0,0,0, 0,1,0)

The thing is for all intents and purposes if you were to try to work with this outside that tutorial?
I found it rather confusing as what should be left of the screen ends up right and vice versa
as they use a special set of rendering loops in tandem with a couple tables for placement purposes.

oh and a zlevel of 0 will have you looking down at that same scene and it will disappear.
So this?

camera(0,CamHeight,0, 0,0,0, 0,1,0)

would make everything in the 3D lab demos? disappear cause you’d be right atop it
looking down from above through it. Surprisingly enough the closer to 0 the zlevel the
higher up the camera goes.

So for me to just turn the camera around so that everything that should be left is left
makes more sense hence:

camera(0,CamHeight,300, 0,0,0, 0,1,0)

is recommended.
You still might want to use atleast one for loop for rendering purposes but not necessarily for placement.

But back to what we were really talking about 2d horizontal x space versus 3d horizontal x space.
Or where you put stuff/how your touch is read by default on the x axis versus
where you put stuff/how your touch is read in 3D space on the x axis.

To further add to the confusion betwixt the two your touch coordinates don’t always line up by default
even if you were to take careful consideration of one in relation to the other. While other times they do line up.

This inconsistency makes it increasingly hard by default to directly touch/move stuff in 3d space
cause you’re always doing so from the 2d plane. But isnt there some solution somewhere to this problem?

The answer is found in NDCs or Normalized Device Coordinates.
Which remedies the problem of detecting what’s under your finger.

But how do you convert this

1/camera(0,CamHeight,300, 0,0,0, 0,1,0)

into a variable?

I was not sure if your questions were rhetorical, but does this past discussion help you?

@mpilgrem so what youre saying is unproject() is now available as of update 1.41?

I am not saying that - Only that the past discussion might help with the question ‘isn’t there some solution somewhere to the problem of mapping 2D touches to objects in 3D space’.