I am Making a Game where if the character reaches the house he doesn't go through it i have searched the internet but have found no help. please could someone help me as i am new to codeing
Is the house in question an Actor object or something that is part of the world background image? I probably will not be around to respond again, so your next post should be open for all (or any) to respond.
Also, what do you mean by 'through it' (referring to the actor going through the house)?
What is wrong with basic collision detection with 'getOneIntersectingObject' (or 'getIntersectingObjects')
- move the actor
- if intersects, move the actor back
Are you using 'move' or 'setLocation'? How do you determine direction of movement? What are the classes involved? Plus others.
It is very hard to help when there is no starting code to begin with. Nobody has any idea as to how you coded anything, and therefore will not be able to resolve your issue without much deliberation.