O'Reilly logo

Virtual Reality Blueprints by John Williamson, Charles Palmer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Controlling the zombie prefab

This next script manages zombie behavior. With it in place, a spawned zombie will:

  • Turn toward the player and start walking
  • Move at a predetermined speed
  • Die at the appropriate times
  • Randomly choose one of the three death animations: FallBack, FallLeft, or FallRight

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required