问题
I am developing a game when there is a line and physics object
The line code is:
And the interesting thing is that when i code print ("collision is here") (for ex) they some how don't even collide!
Both line and obj bodies are static
How can make this collision happed? thanks in advance!
回答1:
Static bodies can't collide with each other, but this question has a solution.
回答2:
IF both lines are static make a function where you detect the x and y of both object and make equation accordingly, for example : line.x + 20 > obj.x then print(collide).
来源:https://stackoverflow.com/questions/11915215/collision-of-a-line-and-object-corona-sdk