Animating Augmented Reality Content in .NET MAUI on iOS
Building on interacting with AR content, David Britch shows how to animate a node while still letting users manipulate it. He overlays an image-wrapped sphere representing Earth and rotates it continuously on the Y-axis.
What you’ll learn
- Building a sphere node — creating an
SCNSphereand mapping a 2D world map image onto it as a material - Animating with SCNAction — using
RotateByandRepeatActionForeverto spin the node, and a reusable extension method for anySCNNode - Starting and stopping — toggling the animation with a tap gesture and keyed
RunAction/RemoveActioncalls - Keeping it interactive — supporting pinch-to-scale and rotate gestures alongside the animation
Read the full post for the sphere, animation, and gesture code, and note that ARKit requires a physical iPhone.