Marcousik Posted June 18, 2017 Posted June 18, 2017 Hey, It seems I have a problem to catch only the entities that intersect the aabb... Instead of this I get all entities in the world, that's my code: ---------------------------------------- function Callback(entity,extra) if entity.script~=nil and entity.script.name~=nil then System:Print(entity.script.name) end end function Script:UpdatePhysics() local aabb=self.entity:GetAABB() world:ForEachEntityInAABBDo(aabb,"Callback") --System:Print("AABB: "..aabb:ToString()) end ------------------------------- I put this script on a box in the map. This returns names of a few entities that are not intersecting the box... What do I wrong ? thx for any Idea -------------------------------- It seems this works well with primitives but wrong with models, that's mean models seem to be caught as intersecting when they are not... Quote
Josh Posted June 18, 2017 Posted June 18, 2017 The model AABB might be a little bigger than the model itself. Quote My job is to make tools you love, with the features you want, and performance you can't live without.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.