How can i make it game over when character hits a wall?


I’m very knew to Armory3D and this might be a stupid question but i cant find any simple tutorial’s for this.
I would like to make a set of nodes that make it so when the player hits a wall the game will end


Something like this should work. You have to apply rigid bodies in the physics panel to both objects you want to be able to collide with each-other and you can use the GetContacts node to get a list of objects that are touching the character. If it is greater than 0, then you shutdown the game ( you would probably want to do something more graceful than shutdown the game, though ).


Thank you this sounds a lot Easyer than i thought😂 I’ll give it a go and yer think I’m going to make and game over screen with a retry button😀


He must set physic layers if there is a floor, to only detect collision with walls.
Just saying in this particular situation game.


thank you this worked :slight_smile: and if i wanted to make it so instead of the game shutting down a game over screen to come up would i just need to change the shutdown node at the end of the node tree?


Yep, you could change that to a Set Scene node and have a different scene for the game over screen. Then on the game over screen you can use the Set Scene node again to switch it back to the game when press a button.


Thanks for the help ill give this a go :slight_smile: