Hello and welcome back!
This week has been a quiet one, but with some progress. Last time we had built our board and added a player with movement on it. This week, I’ve created a basic teleport pad which is my first “Ladder”, and added in scripting to automatically move the player. Once that worked I created other teleport pads and found my first bug which causes my player to spin out of control.
Creating the teleport pad
In my concept of Snakes and Ladders I’ve decided to swap the “Snakes” and the “Ladders” for portals. If you land on a green portal you get teleported up to its matching end, but if you land on a red portal you get teleported down to its matching end. This keeps it style with my space station theme whilst still including the concept of snakes and ladders.
I created a basic teleport pad using a 3D Cylinder shape. I squished it down to look like a disc and placed on the floor tile. At the moment it’s a basic shape with no colouring or effects, but once I have the foundations of the teleport pad working I’ll spruce it up in a future sprint. Once I had my basic shape I added a collider to it and set the “Is Trigger” property to ticked. This will allow a script to run once the player steps on the pad.

Doing a quick google search I found the following script in the forums, provided by PurifiedBananas. (Nice handle).
I created a new teleport script in my project, added the code provided here and added it to my teleport pad. I also needed an end pad where my player would teleport too, so added that and assigned that as the target location used by my script. Finally I added a collider to my player to help initiate the script when stepping on the pad.
It worked, and first time too. When the player steps on the pad they are instantly transferred to the end point pad, which in this instance is on the next floor up. There is one issue however, when the player appears at the end point they then spin off the board into oblivion! That’s not right, and I suspect it may be due to the fact that I’m not using gravity on my player properly and the colliders on the floor pieces to stop the player falling through them.
It looks like I have my first bug to investigate!
Organising my project for easier navigation
Before checking out the bug however, I decided to add in my other “Ladder” portals so that I can test them thoroughly once I’ve resolved the spinning player issue. At this point I realised that the naming convention of my game objects wasn’t the best and I could quickly lose where my teleport pads should be if I didn’t rename them.


Rather than grouping game objects as floors and individual spaces within them I’ve decided to rename each individual space to the number it will be on the game board, then group them as the game board numbers would look at the end. This will make it easier to navigate and make sure then when I place a teleport pad on the board I’ll be able to find the space it’s end pad should sit on easier.
Conclusion
As mentioned, a shorter week of progress this week, but some progress none the less! I’ve now got my “Ladders” in place and working, though at some point I’ll need to change the logic so that the teleport code only runs if the player STOPS on the pad. Currently it will run as soon as the player touches it. That’s for a future sprint however.
Next week will be my last sprint before a break for the holidays, so I’d really like to focus on resolving the issue with the player spinning, and once I have that sorted I can come back to more work on the portals. Hopefully, I can get to that before the holidays.
Until next time,
Dan
Leave a comment