Small Unity scene: spheres spawn from one fixed point, fade in while falling, bounce on a platform, roll, collide, and fade out when needed. Spawn rate is adjustable with a slider.
The goal was to keep it simple and clean, like a quick prototype.
- Open the project in Unity (URP recommended, tested in Unity 2022.3 / Unity 6).
- Open scene: Assets/Scenes/01_TestAssignment.unity
- Press Play.
- Use the slider at the bottom to change the spawn speed.
- Hold Left Mouse to orbit the camera.
// I have tested the project and noticed that after cloning, some links may not work correctly. It runs fine on my side, but you might need to re-assign certain materials or UI elements after cloning.
For a quick preview, you can test the project here: https://el-legato.itch.io/testsassigment
- Left Mouse + Drag — orbit + add force to spheres. (Through then with the force)
- Spawn Rate Slider — slower ↔ faster flow.
- Fade‑In while falling: new spheres start transparent and become opaque.
- Landing & nudge: first contact gives a small bounce and a push sideways.
- Collisions: sphere vs sphere → fade‑out and remove.
- Distance rule: if a sphere rolls too far from its landing point → fade‑out.
- Camera nudge: quick camera moves add a tiny push to spheres that are on the platform (not the ones in the air).
- Pooling: spheres are reused (no runtime Instantiate/Destroy spam).
Assets/Scripts/Spawner.cs— timer + slider to spawn spheres from one fixed point.SpherePool.cs— very simple object pool.SphereAgent.cs— sphere logic (fade in/out, bounce, roll, collisions).OrbitCamera.cs+OrbitImpulseBus.cs— orbit camera and small world push.LightRigController.cs— slow light motion for nice highlights.PhysicsSetup.cs— ignore certain layer collisions.
Assets/Scenes/01_TestAssignment.unity— main scene.Assets/Settings/— URP profiles (optional).
SphereAgent
- Bounce
lateralSpeedRange— horizontal speed on first bounceupwardSpeedRange— vertical speed on first bounce
- Secondary bounce (small extra hop after landing)
secondaryBounceCoeff(0.2–0.35 works well)secondaryMinSpeed,secondaryCooldown,secondaryMaxBounces
- Fade
collisionFadeSpeed,distanceFadeSpeed,distanceThreshold
- Blue palette only
hueCenter~0.61 (blue),hueSpread±0.03,saturationRange,valueRange
- Emission (HDR)
emissionWhileFalling,emissionWhenLanded(higher = stronger bloom)
Spawner
spawnInterval(smaller = faster flow)maxActivecap to keep performance safe
- File → Build Settings…
- Add
Assets/Scenes/01_TestAssignment.unity. - Choose PC, Mac & Linux Standalone (or any target).
- Build.
- Pooling is used to keep FPS stable.
- Material color/emission are changed with
MaterialPropertyBlock(no material duplication). - Platform is a simple disc (or a bowl) with a collider; tag Ground.
- Camera push affects only grounded spheres (not airborne ones).
- Rim / Fresnel emission for a stronger “glow from inside”.
- Auto camera path + timed flow ramp for a quick demo video.