Adding Objects to Spatial Hashes - 3D Collisions in GameMaker

Опубликовано: 08 Ноябрь 2024
на канале: DragoniteSpam
363
12

Let's write some code to add objects to spatial hashes! There's a lot more involved here than there was to adding objects to trees, but it'll be worth it when we're finished, I promise.

3D collisions in native GML are one of the more commonly requested tutorial subjects I get. This is a big subject and will require a long time to cover properly, but they can be done - no external DLLs required!

As always, you can find the GML code on my tutorial Github:
https://github.com/DragoniteSpam-Game...
Each week is its own release tag:
https://github.com/DragoniteSpam-Game...
https://github.com/DragoniteSpam-Game...

3D collisions in GameMaker playlist:
   • 3D Collisions in GameMaker  
GameMaker 3D playlist:
   • 3D in Game Maker Studio 2  
GameMaker Studio 2 playlist:
   • Game Maker Studio 2 - General Tutorials  

0:00 Introduction
0:58 SpatialHashNode Add and Remove
3:03 The hash function
5:53 Getting an object's bounding chunk
11:40 SpatialHash Add (the normal cases)
25:27 SpatialHash Add (the special cases)
30:40 The end

#GameMaker3D
#GameMaker3DTutorial
#GameMaker3DCollisions
- - - -
I've now made that Patreon:
  / wizardragon  
That promised social media link spam.
  / dragonitespam  
Transition / idle music is by my old friend Kamex:
   / greatgabite  

Rate, comment, subscribe, watch more, enjoy!