@saki7 wrote:
I have a code which draws a multiple 2d rectangle inside
cam.begin()
andcam.end()
. (I assume this adds the z axis, which actually translates the dimension to 3d.)(Question 1)
Now, I want to check whether a mouse cursor is currently hovering a specific rectangle. I assumecam.screenToWorld(mousePos)
does the trick but I can't figure out the actual code.(Question 2)
I also don't know how to get themousePos.z
value of the mouse cursor (because mouse coordinates are 2d.)(Question 3)
Same applies to the rectangle. How to get the normalized z value of an actually 2d-drawn rectangle?Could someone help me on this? Thanks.
Posts: 1
Participants: 1