how to interact directly with space coordinates? #1137
-
How can I limit or expand the update scope of objects? I want objects outside the screen at some distance to still update, and objects beyond this area stop updating. I understand how to do this, but I can't figure out how to interact directly with space coordinates |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
What do you mean by "update"? Are you referring to the Check the You could also check the position of an object within the world with a to call |
Beta Was this translation helpful? Give feedback.
What do you mean by "update"? Are you referring to the
Node::update()
method?Check the
void Sprite::draw(Renderer* renderer, const Mat4& transform, uint32_t flags)
function to see how it handles culling, and perhaps you can use the same method to stop updating the object.You could also check the position of an object within the world with a to call
getWorldPosition()
on that object (if it's a subclass ofNode
). You would then do the boundary checks based on that position.