[SOLVED] How to detect the collision between two different object in different AppState

@yaRnMcDonuts I tried use this code:

if(geom.collideWith(spaceShip.spaceShipList, results)) { }
But it show this code is error , why ?

You are giving the method invalid paramaters - an ArrayList is not a Collidable. I suggest reviewing the javadoc for methods like the collideWith() method in order to understand them better.

You can also right click on a method in the SDK and select ‘Navigate’ → ‘go to source’ to view the code behind the methods you are using - if you view the source of a Spatial or BoundingBox, you will see that the class implements the Collidable Interface.

Learning to investigate the javadocs and source code is one of the most useful things you can learn to do, and will most likely be the fastest way for you to figure out and solve 95% of the errors and issues you encounter while making your game.

1 Like

I am not very good in English , but I will try it. :smiley:

1 Like

Thanks for all of your reply , in the past few day , I find the Neon Space Shooter Tutorial and this tutorial also help me fix all of the problem of making a spaceShooter.
But thanks for guys so … much :smile: :smiley: :grinning: