© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2024
C. HardmanGame Programming with Unity and C#https://doi.org/10.1007/978-1-4842-9720-9_24

24. Spike Traps

Casey Hardman1  
(1)
West Palm Beach, FL, USA
 

The final obstacle we’ll implement will be a spike trap. It will teach you a new concept and give you more practice with the concepts we learned in previous chapters, like Slerping over time, working with state, and Invoking methods to time transitions in the state.

Our spike trap will be a thin, square “plate” laid out on the floor which has lots of little “spikes” sticking out of it. For simplicity’s sake, we’ll make the whole thing out of cubes. When the trap activates, the spikes quickly raise, poking up out ...

Get Game Programming with Unity and C#: A Complete Beginner’s Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.