Question about Maths

Hi , i want to ask if someone knows how can i check if an object is under another or right side or left side. For example, the camera focus one object, and then i press down, the software needs to know if there is another object under him (under or under-back) and if it is move the camera to that object.


that’s down to vectors/matrices. you would need an xyz vector describing the objects position in world space, an xyz vector describing it’s rotational orientation in worldspace, and an xyz vector describing its scale in worldspace. this 3x3 matrix makes up the complete orientation. once you have that you can quite easily tell whether any other object is within any given boundary in any direction from the object.

Hahaha ok, im not very good with matrix, i will try and if i cant get it, i will tell you