Z
Ziphold
Guest
Hello again!
I'm currently implementing culling in my game and everything works fine until I start rotating the view.
This is the simple portion of code that controls it.
Now, because the view is rotating, that wouldn't always work because view_wview and view_hview are always the same, independent of the room view. So sometimes, the code would take effect even when the point is in view, and sometimes it wouldn't when the point is out of it. (Which is opposite of what I want)
I would be thankful if anyone posted their idea of how I could solve this.
In advance, thank you.
I'm currently implementing culling in my game and everything works fine until I start rotating the view.
This is the simple portion of code that controls it.
Code:
lastPointInView = point_in_rectangle(lastPointX,lastPointY,view_xview,view_yview,view_xview+view_wview,view_yview+view_hview);
if !lastPointInView {
lastPointIndex ++;
pathAddRandomPoint();
}
I would be thankful if anyone posted their idea of how I could solve this.
In advance, thank you.