Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
4 votes
1 answer
3k views

How to stop sprite when overlap on in libgdx?

How can I stop my player if he overlap or touch the ball? In my top down game my player is cat and I want to stop his moving or stack in that place of the ball is located if he hit the ball I'm using ...
zarawayun's user avatar
5 votes
2 answers
5k views

How do I test for intersection between a ray and a cone?

I decided that writing a ray-tracer in my game was a brilliant idea, and so now I am looking for code to use for ray to primitive intersection tests. I have based my effort on this very nimble yet ...
Mr. Developerdude's user avatar
1 vote
3 answers
4k views

Java 2D Game Hitbox Detection & Rounded Corners

I am working on a simple 2D game with Java, Swing and no framework. I have a rectangular player that the user can move around. On the map are few obstacles which the player should not be able to go ...
Aruloci's user avatar
  • 111
1 vote
1 answer
1k views

Is this the correct way to detect ray-sphere intersection?

I have this java function that should return a true or false for any sphere passed to it if they intersect. However it seems to end being true a lot of the time when it shouldn't and false sometimes ...
Christopher Lawless's user avatar