Skip to main content
LNATIONDEV
Inspiring
July 18, 2025
Solved

Understanding the rooftop racers demo

Hello,

Unsure this is the correct forum to ask this question, it seems you can only have access to one at a time which is a bit silly but any ways. I've just downloaded the sample "rooftop racers" world and I'm looking at the the double jump logic. I see the relevant logic inside PlayerLocalController script that actually implements the double jump. I think I understand the toggle stuff between player and server running. However what is confusing me is in the world there are 8 objects configured with the script attached. Setup like you have to attach the object/script to the player when they enter the game. Is this truthful and where can I find that logic which attaches the player to the object?  

LNATIONDEV
Inspiring
July 18, 2025

I followed the code from the event OnDisplayHintHUD, this led me to sysPuzzleEnter that handles players joining. Players are passed in that event and then the HUD are attached. It's a bit convoluted but makes sense. I will sleep better tonight now I understand this. 

2 replies

LNATIONDEV
Inspiring
July 18, 2025

I decided to look for other examples, and found this tutorial Module 2 - The HUD System | Horizon Worlds that says to  "verify that you have one HUD entity for each possible player in your world." but after reading the tutorial in full and inspecting the code it's no clearer how a HUD in this case is attached to the incoming player. Just looking for the event/lines that actually do this action.

LNATIONDEV
LNATIONDEVAuthorAnswer
Inspiring
July 18, 2025

I followed the code from the event OnDisplayHintHUD, this led me to sysPuzzleEnter that handles players joining. Players are passed in that event and then the HUD are attached. It's a bit convoluted but makes sense. I will sleep better tonight now I understand this.