# Hyperfy Discord - 2025-03-17

## Overall Discussion Highlights

### Development & Technical Updates
- **Hyperfy Plugin System**: Ashxn provided guidance on using the inject method to extend functionality in createClientWorld/createServerWorld, helping developers convert mods to the plugin system.
- **Physics Interactions**: Confirmation that rigidbody.addForce() and rigidbody.addTorque() methods are available for physics interactions, with more functions planned for vehicles.
- **Three.js Integration**: Discussions clarified that while Hyperfy is built on Three.js, not all Three.js objects are fully exposed yet. The platform is working toward maximum performance and flexibility.
- **Cursor-Hyperfy Integration**: Peezy developed an integration between Cursor (AI-powered code editor) and Hyperfy using MCP, enabling live code updates without manual copy-pasting.
- **Authentication Implementation**: Developers discussed approaches to authentication, including session management and Web3 wallet-based authentication using signatures and JWT.
- **VR Compatibility**: Users reported issues with VR mode not loading properly on vox.b34k3r.com, with Ashxn confirming a fix in the latest dev branch.

### 3D Design & Creative Projects
- **City Building Techniques**: 𝚟𝚘𝚡𝚟𝚒𝚎𝚗𝚗𝚎 is working on 500 building blocks for a large-scale city project, utilizing atlasing and instancing for performance efficiency.
- **Interactive Objects**: Cru shared updates on interactive objects including a projector with on/off functionality and sound effects, and a drum pad with potential for improved colliders.
- **Random Avatar Assignment**: Peezy implemented functionality that auto-assigns random avatars from a station when users first login, persisting between sessions.
- **UI Improvements**: Ash updated padding/margin on UI elements to allow images to fit as triangles on pyramids.

### Community & Events
- **BitCinema Event**: VTATV reported on a successful in-person event combining web3, fashion, music, and networking that sold out with 175 attendees.
- **Tutorial Series**: Omka shared an invitation for an upcoming tutorial session featuring an open-stage format for participants to get help.
- **GitHub Documentation**: Jin and Omka collaborated on improving the Hyperfy GitHub repository documentation to make the project more accessible to newcomers.

### Market & Token Discussion
- Brief mentions of Hyperfy token price (6.9M/-4% against SOL), with some users expressing concern about price performance.

## Key Questions & Answers

**Q: How do you hook up both client and server to the plugin system?**  
A: Add systems in createClientWorld/createServerWorld and use the inject method in the system's init() function to extend functionality. (Ashxn)

**Q: Does the "1 light is best in a world" guideline include the world sun?**  
A: Yes, it does include it, but two lights won't make a huge difference. (Ashxn)

**Q: Can we add forces to rigidbodies?**  
A: Yes, rigidbody.addForce(force: Vector3) and rigidbody.addTorque(force: Vector3) are available, with more functions planned for vehicles. (Ashxn)

**Q: Why use stateful sessions with a session ID instead of stateless tokens?**  
A: Stateful sessions are useful when you need to attach additional information within a session, while stateless is simpler for basic auth validation. (mattimus)

**Q: Is it possible to access Hyperfy from Apple Vision Pro?**  
A: People have tried on v1 and it worked, v2 is untested but should be possible with tweaks if developers have access. (Ashxn)

**Q: Is there a way to avoid new users entering as the Hyperfy bot?**  
A: Peezy shared a solution that auto-assigns random avatars from a station when users first login.

**Q: Can I use Three.js inside Hyperfy?**  
A: You can do some things with Three.js but not everything is exposed yet; Hyperfy is working on maximum performance and flexibility. (peezy)

**Q: Can anyone get this running in VR?**  
A: Multiple users confirmed issues with VR mode not loading properly; Ashxn later indicated it was fixed in latest dev branch. (drdoge.eth, Ashxn)

## Community Help & Collaboration

1. **Plugin System Guidance**:  
   Ashxn explained the inject method pattern to peezy with code examples showing how to extend world functionality.

2. **Authentication Implementation**:  
   Mattimus explained differences between stateful and stateless authentication methods to devilsadvocate.sol, while peezy shared a step-by-step process for wallet-based authentication using signatures and JWT.

3. **Hyperfy Object Manipulation**:  
   Omka provided instructions to treed on how to inspect and duplicate objects in build mode and recommended Blender tools.

4. **Three.js Implementation Help**:  
   Peezy explained Hyperfy's Three.js implementation limitations to treed, sharing video examples of what's possible, while Mugenomics identified duplicate opening HTML tags in treed's code.

5. **GitHub Documentation Collaboration**:  
   Jin and Omka worked together to improve the Hyperfy GitHub repository by adding links to documentation, website, and playable demos.

6. **VR Compatibility Testing**:  
   Multiple users (drdoge.eth, others) helped 𝚟𝚘𝚡𝚟𝚒𝚎𝚗𝚗𝚎 test VR compatibility issues, confirming the problem and identifying it was fixed in the latest dev branch.

## Action Items

### Technical
- Improve colliders and add visual feedback when drum pad is activated (cru)
- Clean up sound loop on projector to remove delays (cru)
- Implement loading random avatars from URLs to reduce .hyp file size (peezy)
- Integrate with opensourceavatars.com database directly (Omka)
- Fix VR mode loading issues on web projects (𝚟𝚘𝚡𝚟𝚒𝚎𝚗𝚗𝚎)
- Update to latest dev branch for VR fix (Ashxn)

### Documentation
- Add links to docs, website, and playable demos in GitHub repository README (jin)
- Improve "What is Hyperfy" page (Omka)
- Create simple code examples (rotating object, changing color) for beginners (treed)
- Create tutorials for building techniques including light baking on window frames (𝚟𝚘𝚡𝚟𝚒𝚎𝚗𝚗𝚎)

### Feature
- Implement namespace separation (e.g., world.solana, world.ethereum) to avoid conflicts between plugins (Ashxn)
- Add rigidbody.addForceAtPos(force, pos) for advanced physics interactions (Ashxn)
- Create a "studio" repo with Rollup and MCP bridge between IDE and Hyperfy world (peezy)
- Enable water balloons to affect other PhysX objects for interactive gameplay (ApeironCreations)
- Create a unified landing page that directs to v1, v2, playworld, docs, and marketplace (Omka)
- Expand Three.js object exposure in Hyperfy runtime (peezy)
- Develop "hypergolf" game (cru)
- Build proper car apps with good physics and sounds (𝚟𝚘𝚡𝚟𝚒𝚎𝚗𝚗𝚎)