VRChat Magnetic Interaction System

説明
Add realistic, physics-driven magnetic behavior to your VRChat worlds with this modular Magnetic Interaction System.This asset gives world creators intuitive, drop-in magnets that feel right — responsive, physical, and stable in VR.
Designed from the ground up using acceleration-based physics, these magnets preserve gravity, collisions, and natural motion while delivering satisfying attraction, repulsion, and snap behavior.
✨ What’s Included (v1)
🔹 Soft Pull Magnet
A smooth, gravity-friendly magnetic pull that:
Gently attracts objects within range
Pulls harder as objects get closer
Stops cleanly at a configurable distance
Automatically resumes pulling if objects are separated again
Perfect for:
Puzzle pieces
Floating props
Sci-fi effects
Ambient world interactions
🔹 Polarity Magnet (North / South)
A true two-pole magnet system with realistic behavior:
Separate North (+) and South (−) pole positions
Opposite poles attract, same poles repel
Objects rotate and align naturally as they connect
Strong snap near contact without jitter or buzzing
Stable stop / resume logic to prevent vibration
Perfect for:
Physics puzzles
Modular props
Educational worlds
Toy-like interactions
🔹 Charged Magnet (Single Polarity)
A simpler positive / negative charge system:
Each object has a single charge (+ or −)
Opposites attract, same charges repel
Shared tuning style with the polarity magnet
Optional rotational alignment for extra realism
One-slider overall strength control for easy balancing
Perfect for:
Game mechanics
Energy-based systems
Abstract or sci-fi designs
⚙️ Key Features
Gravity-preserving physics (no “floaty” behavior)
Acceleration-based magnet forces (feels natural in VR)
Adjustable:
Magnetic strength
Snap intensity
Pull radius
Stop & resume distances
Optional alignment torque (magnets rotate into place)
No tags required (Udon-safe, component-based)
Trigger-based detection for performance & stability
Clean prefab structure, easy to customize
Designed for VRChat + UdonSharp best practices
🧱 Setup Overview (Simple)
Add a Rigidbody + Collider to your object
Add the magnet script (Soft Pull / Polarity / Charged)
Place the included empty transforms (poles or charge point)
Adjust strength and radius in the inspector
That’s it — no scripting required.
🎮 Use Cases
Physics & logic puzzles
Modular building systems
Interactive toys
Educational simulations
Sci-fi or fantasy props
World ambience & polish
🛠️ Technical Notes
Built with UdonSharp
Uses trigger volumes (no expensive physics forces)
Stable stop/resume logic to prevent jitter
Designed to be network-friendly (ownership handling can be layered on if needed)