up object
#4

If your box would be 2x2x2 meters in size, and the box is at coordinates 10, 15, 3 (x, y, z), you could check if the player is in range of the center of the box (10, 15) and 1 meter higher than the position of the box (this would be the top-plane of the box).

For this given box, you check if the player is in range of 10, 15, 4 with a small range (1m for this box since it's only 1 meter from box-center to a side of the box).
So the player must be on top of the box for the range-check to trigger.
It could still fail if the player is standing at the corner of the box, since a corner is 1.41m from the center.
You could still use a range of 1.41m to include the corners of the box.
Reply


Messages In This Thread
up object - by StarPeens - 02.04.2015, 01:59
Re: up object - by KayJ - 02.04.2015, 03:11
Re: up object - by StarPeens - 02.04.2015, 03:17
Re: up object - by PowerPC603 - 02.04.2015, 05:20
Re: up object - by StarPeens - 02.04.2015, 15:12
Re: up object - by BleverCastard - 02.04.2015, 15:30
Re: up object - by StarPeens - 02.04.2015, 15:34
Re: up object - by PowerPC603 - 02.04.2015, 18:24
Re: up object - by StarPeens - 02.04.2015, 19:50

Forum Jump:


Users browsing this thread: 1 Guest(s)