03-01-2015, 08:59 AM
(This post was last modified: 03-01-2015, 09:01 AM by DiamondToaster.)
For some reason, I'm unable to call cBoundingBox:IsInside(). I wanted to to something like this :
(A table object "Arena" contains a bounding box btw.)
But when I call that, it says something like "given const Vector3d: expected cBoundingBox"
Ok, So I make a bounding box with the player dimensions:
But is spits out "given [no object]: const Vector3d expected"
What am I doing wrong? Any help would be appreciated.
(A table object "Arena" contains a bounding box btw.)
if Arena.BoundingBox:IsInside(Player:GetPosition()) then -- do stuff end
But when I call that, it says something like "given const Vector3d: expected cBoundingBox"
Ok, So I make a bounding box with the player dimensions:
local PlayerBoundingBox = cBoundingBox(Player:GetPosition(), 0.4, 1.8) if Arena.BoundingBox:IsInside(PlayerBoundingBox) then -- do stuff end
But is spits out "given [no object]: const Vector3d expected"
What am I doing wrong? Any help would be appreciated.