Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17625

Physics2D, How would I handle this collision?

$
0
0

I have a point, and a line.

The point can move, the line cannot. 

When the point moves into the line, it should not be able to cross it, but should be able to press flush against it. And if the line is sloped, a portion of the motion should be converted along the line.

At the moment, when the point hits the line, its speed is set to zero, then because it directly intersects the line, it is always hitting the line, and it does not matter if it is moving away from the line because it is …


Viewing all articles
Browse latest Browse all 17625

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>