Modeling & Simulation:
A Study in Unity
by Holger Findling | Sep 25, 2020
Available at Kindle, Amazon
The book is intended for anyone interested in modeling and
simulation using the Unity Game engine. The book does not
focus on any specific game development, but introduces the
reader to all concepts required to develop simulation projects.
Numerous examples of C# scripting and shader developments are
provided with detailed explanations. Examples include character
development, state machines and animation, basic AI features
using Navigation Meshes, Terrain and Texture design.
The reader should be able to design and develop their own
3D games after understanding these design features.
The book assumes the reader has an understanding of basic
programming skills, but no further experience with C#
programming or scripting languages is required. Prior experience
in programming Unity is not required.
Basic Unity Script
The basic unity script is defined in Chapter 4, Introduction C# Scripting. the application.
Suzanne is a primitive provided by Blender for testing purposes. In this download Suzanne is captured to a Unity Asset and includes a C# script which rotates the model and provides for an exit from the application.
The project demonstrates obtaining a reference to a sphere gameObject which is rotating about another spinning cube gameObject.
In this package two Sphere game objects (primitives) from the unity editor are arranged to orbit a larger Sphere. Movements are controlled by a C# utility script.
The bouncing balls are comprised of three Unity spheres. Each sphere is controlled by a separate animation clip and animator controller. No C# scripts are used for the animation.
A moving ball is colliding with a stationary ball, causing the stationary ball to move. Both balls are rigid bodies.