top of page

Starchild Petting system (Summary)

Writer: Louis Charles La Manna Harvey
Louis Charles La Manna Harvey
May 21
2 min read

StarChild is a virtual pet mobile game centered on a dog character. I designed and built the full petting interaction system — the technology that makes the dog feel alive when touched.

The core problem: a touch on a mobile screen needs to translate into a believable, emotionally responsive animal. That requires solving spatial input, IK, physics, emotion, and micro-animation as a single connected system.


How it works at a high level:

Touch input is cast as a trace against the dog's mesh. Named sockets placed across the skeleton act as spatial samples — each one carries IK offset data and face orientation data in a UDataAsset, keyed by the dog's current emotional state (Calm, Excited, Annoyed, etc.). Multiple sockets within range of the hit contribute to the final IK target, weighted by distance and surface normal agreement, so the dog's head responds to where you're touching and what surface you're on.


A 3D vector PID controller smooths the IK goal, giving the head a sense of physical mass rather than instant snapping. Crucially, this same PID governs emotional transitions — when the dog's mood changes, the IK target shifts to the new emotional profile through the same organic settling, so emotional state changes feel physical rather than switched.

The softmax debate: The client requested a softmax blending function to further smooth socket transitions. I implemented it, but disagreed with it on biological grounds: when you move from petting a dog's ear to its underchin, a real dog snaps its head to the new position rather than arcing smoothly through the transition. That jolt is part of what reads as alive. Softmax removes it. The parameter is tunable; the tradeoff is documented.


The nudge system: A late-stage "nudge" feature request turned into two systems when the client and I realized we had each pictured something different. I built Auto Nudge — the dog pushes its head into the hand during sustained petting, driven by burst impulses with randomized timing. The client had pictured User Head Push — the finger's movement displaces the head with light momentum, as if it has physical weight. Both shipped. Both run in parallel. The misunderstanding produced a more complete system than either interpretation alone.


The trigger system maps named socket groups to pooled micro-reactions — animation montages, morph target pulses, VFX, SFX, and haptics. Each reaction pool is emotion-aware: the same ear-scratch triggers a different animation if the dog is playful vs annoyed. Everything is data-driven; adding a new reaction is an asset change, not a code change.


In summary:

The system processes real-time spatial touch input, resolves it through weighted socket geometry, filters it with a PID controller, maps it through an emotional state layer, and dispatches event-driven micro-reactions — all running each frame on mobile.

 
 
 

Comments


bottom of page