Hi RaananW!
Sorry if I wasn’t explicit enough, I will try to better explain what I meant
About my “deduction from your answer”, I was referring to thes part of the phrase where you said:
fov is being ignored, since we are using the projection matrix directly. If you want to do it , you will need to calculate the projection matrix yourself
Which led me think you knew what camera projection matrix, and matrices in general, are (and how to work with them)… Which I think it’s the knowledge I’m missing to achieve what I’m looking for
I’ve then updated my playground experience with Matrix.PerspectiveFovLHToRef
as you suggested, but it seems that I’m still not doing it correctedly since it doesn’t behave as expected…
Here is the goal of the experience: I want to turn my debug area (which has the width/height percentage I want to use for my isInFrustum
checks) to green only if the sphere is in the center of the screen area.
It’s similar to StarWars spaceship combat scenes actually, where you can fire only if the enemy is 'locked-on" on the center of the aim helper ^^
And about your other questions:
isCompletelyInFrustum
, no I do not need the object to be completely inside if just one tiny bit is inside then I want to return true- what I want is different frustum planes per object, based on the size of the frustum that each object will require to be detected (in our StarWars example, some spaceships are “more easy/difficult” to lock-on than others)… Using a different camera for each one of them is a suggestion from sebavan, which I thought it could work if we can easily change the width/height of each camera… But, as shown in my playground example, I then dispose the new camera right after having created it since what I truly need is just the view/projection matrices to create the frustum planes