What I'm trying to achieve is limiting the orthogonal camera movement to the positive axis(x,z) , so the camera clamp/stop moving to the negative axis.

The problem is I can' find any property or method that , gives me the area(the yellow rectangle) which the camera can see:

enter image description here

the camera follow the player on the (x,z) only.

if I can get that yellow rectangle, I can check if it's going to go past the positive axis , then I won't move the camera , or there is any better way?

  • \$\begingroup\$ I don't understand the goal. Are you rotating the camera? - Anyway, the area the orthogonal camera sees is controlled by the size property. Documentation says "The camera's size measured as 1/2 the width or height. Only applicable in orthogonal mode. Since keep_aspect locks on axis, size sets the other axis' size length.", So to compute the size of the yellow rectangle you also need to know keep_aspect and the size of the view port. \$\endgroup\$
    – Theraot
    Jun 14 '21 at 7:36
  • \$\begingroup\$ @Theraot the goal is: to make it easier for me to calculate and save the data on the server side , no am not rotating the camera, I'm treating the camera as 2D camera , I will try to work with the info you gave me, thank you \$\endgroup\$
    – Abanoub
    Jun 14 '21 at 9:07

You must log in to answer this question.

Browse other questions tagged .