Disallowed movement
#11
The colon doesn't matter. Looking at the coords, I think the problem is the Y coord.

local bblock = cBoundingBox(Vector3d(-372, 218, 131), Vector3d(-377, 220, 130))

You have 218 and 220, that means the player has to be in the height between 218 and 220, to be trying to walk into the box. Change 218 to 0 for example and test it again.
Reply
Thanks given by:
#12
*Sigh*


Attached Files Thumbnail(s)
   
Reply
Thanks given by:
#13
I believe the problem is that the boundingbox expects the coordinates to be sorted. Try switching the Z coordinates. That way the lowest coordinates will be The first parameter, and the higher parameters are the second parameter,
Reply
Thanks given by:
#14
First of all you should make the box large, say 50 x 50 x 50 blocks, so that you can actually debug it, see if it works. Only then, after verifying that it works, you should twiddle the coords.
And yes, the cBoundingBox expects the coords to be sorted, the first vector's coords should each be less than the second vector's one.
Reply
Thanks given by: Bobstergaming
#15
(11-18-2015, 04:28 AM)xoft Wrote: First of all you should make the box large, say 50 x 50 x 50 blocks, so that you can actually debug it, see if it works. Only then, after verifying that it works, you should twiddle the coords.
And yes, the cBoundingBox expects the coords to be sorted, the first vector's coords should each be less than the second vector's one.

Works a treat! (Although somehow it broke external connection)
It might be worth outlining the fact that cBoundingBox expects the cords to be sorted
Idea
Reply
Thanks given by:
#16
The documentation does say "min" and "max" for the coord parameters.
Reply
Thanks given by:
#17
Perhaps we should add a Sort function just like in cCuboid?
Reply
Thanks given by:
#18
Or the constructor should sort the coords automatically?
Reply
Thanks given by:




Users browsing this thread: 12 Guest(s)