What to Expect
In the final installment of this tutorial series we will be sending our tank the goal unit and checking with physics if it collides with the goal. If it does, we will de-spawn the tank and destroy its navbot.
- In Level Flow, Connect the Goal Unit to the Tank Unit.
- In the Tank Unit, Create a Physics Actor for the Tank Mesh, Default Settings are find for now.
- In the Tanks unit Flow, use My_Goal unit variable to receive and test if it has “hit” the goal. ?
- In the projects global.physics_properties add Tank and Goal to the Collision Types.
- Now add the needed collision filters.
- And lastly, add the needed collision shapes.
- In the Tank Unit, Update the Collision Actor properties, Set as Follows.
- In the Flag Unit, Create a Collision Actor for the flag_pole Mesh, Set as Follows.
- Test and Run the game.Notice that your tanks now get removed from the playing field when they reach their respective goals.