Slastraf Posted February 7, 2019 Share Posted February 7, 2019 I made an aabb infront of the camera to check what could be in front of it, but I cant figure out how to do this in lua. so far I have this: if window:KeyHit(Key.Q) then local spellPointMin = Transform:Point(-2,-2,0,self.camera,nil) local spellPointMax= Transform:Point(2,2,5,self.camera,nil) local aabb = AABB(spellPointMin, spellPointMax) world:ForEachEntityInAABBDo(aabb,"PushSelf") end the vectors for the aabb are fine, but the code snippet does not work as expected. I have a function PushSelf on an object inside the aabb box. I guess you cant use it like this ? Ah I understood that the parameter is a global function, and entity is the collided object. 1 Quote Link to comment Share on other sites More sharing options...
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.