- Home /
How to keep playing from falling off edge with placeable tiles
I know this topic has been touched on, but this is a specific issue.
I am planning to have a world built from hex tiles. I don't want the player to be able to walk off the edge of these tiles. My player can place more tiles. It's a sort of semi-voxel world, except the tiles can't really be destroyed.
A. Should I use a script which detects ground and stops the player running? (None of the scripts I've found here for this issue are very helpful.)
OR;
B. Should I use colliders which are attached to the tiles, and make a script which destroys colliders on "attached sides" of the tiles? And how would I do that? (I know it will have something to do with making connection colliders, bit I want to make sure this isn't going to be terrible for performance.
I think option A has to be in the update method, where option B could trigger only when the player places a new tile, so wouldn't option B be better for performance? (Also I'm not 100% sure how to script destroying colliders based on them touching other colliders...)
Thank you in advance for any help.
Your answer
Follow this Question
Related Questions
Falling Through an Elevator 3 Answers
RigidbodyFirstPersonController not working after changing caspule collider 0 Answers
[SOLVED] Object keeps sliding? 2 Answers
Moving objects using raycasting? 1 Answer