Boundaries of cube

Blitz3D Forums/Blitz3D Programming/Boundaries of cube

RubyEnemy(Posted 2016) [#1]
I want to set the the edges of a cube to be the boundaries so that the player can't leave them. the cube is 20,20,250. the entity radius just makes a small part in the middle stop the player but the player can go through the walls of the cube. How do i fix this?


Guy Fawkes(Posted 2016) [#2]
**EDIT** : Yes, I know the cube is a little under the floor. I did that to show you that you are INDEED inside the Cube object WITH your correct, "20.0, 20.0, 250.0" parameters.



~GF


Guy Fawkes(Posted 2016) [#3]
***NEW CODE ADDED*** : Ability to see cube light up & turn red if touched, else turn back to White if NOT touched!!!



Hope this helps!

~GF


Matty(Posted 2016) [#4]
Use collisions and set the collision type to 'per polygon'.
You may need to flip the mesh of the cube - I cannot remember if both sides of a polygon count for collisions or not.

That should be all that you need to do...


RustyKristi(Posted 2016) [#5]
Like Matty said it is really easy with collision and you can just flip the mesh so it will be hidden. Make sure you scale it with your preferred size.