官术网_书友最值得收藏!

Collision Detection

Right now, our spaceships can fly around and shoot at each other, but nothing happens.

Collision detection is used in the vast majority of video games to determine whether game objects intersect. There are a large number of methods for detecting collisions between different game objects. Various methods can work better in different situations. There is also a trade-off between the amount of computation time and how accurate our collision detection will be. 

You will need to include several images in your build to make this project work. Make sure you include the /Chapter07/sprites/ folder from the project's GitHub. If you haven't yet downloaded the GitHub project, you can get it online here:  https://github.com/PacktPublishing/Hands-On-Game-Develop ment-with-WebAssembly.

In this chapter, we will discuss the following:

  • Collision detection
  • Collider objects
  • Types of colliders
  • Adding colliders to our game objects
主站蜘蛛池模板: 固安县| 乐至县| 屏边| 双牌县| 肥西县| 弋阳县| 东阳市| 游戏| 台东县| 小金县| 鸡泽县| 西林县| 五河县| 安塞县| 平顶山市| 岱山县| 永登县| 梁平县| 太原市| 徐汇区| 雷波县| 博野县| 县级市| 桐庐县| 刚察县| 新安县| 若羌县| 公主岭市| 中山市| 堆龙德庆县| 宜丰县| 保山市| 武威市| 佛学| 溆浦县| 新邵县| 陆川县| 凭祥市| 惠东县| 册亨县| 加查县|