Tile Collision

Ph33rles

  • Posts: 3
Hey all,

I was exploring around through the editors and what not so I tried creating a "new game" by opening the default space shooter game that came with it. I decided to try and modify it to see if things would change as I expected. I tried to turn change the collisions so the bullets and the players would collide with the tiles so the obstacles would actually obstruct the player and bullets, however after turning on these collisions nothing had changed even after a save and reload of the test scene.

Outside of turning on the collision groups is there something else I'm missing?

Blob

  • *
  • Posts: 722
Make sure the tiles actually have collision boxes themselves by opening them up in the tileset menu. Also make sure all of the actor's collision boxes aren't marked as sensors.

~ Blob

Ph33rles

  • Posts: 3
Hey Blob thanks.

I actually went through and explored more and discovered that as well, and I've gotten both my player ship and the enemy bullets to interact with the tiles, however the player shots still are not stopped by the shots. After trying your advice on turning off the sensor option, the player shots still aren't interacting with the tiles, and the enemies requiring multiple shots are now bouncing backwards across the screen after being hit. This still leaves me with my original issue and I don't see the differences between the two actors of the enemies bullets and the player's bullets that would keep one colliding with the tiles and one not.

Ph33rles

  • Posts: 3
I just figured it out, the bullets were set to cannot be pushed in the physics which was preventing it from colliding and turning it back to normal allows it to collide with the environment, but I have to admit I'm slightly confused about why it was able to collide with enemies when set like that but not with tiles.

Blob

  • *
  • Posts: 722
I think the reason is it has a behavior that specifically tells it to die when it hits an actor, but not a tile. If you want the same effect for tiles, you can add it into the behavior alongside hitting an actor.

~ Blob