is_colliding() Giving False Negative

1SDAN1SDAN Posts: 4Member
edited August 2016 in 2D
So in my current project that I've cobbled together out of various demos and google searches, I've come across an annoying problem. I've found that at a specific point in my code, a is_colliding() call only returns a positive if the Kinematic Body is colliding with the Static Body at an upwards angle. This means that for some reason it cannot detect if I'm on the floor. The specific code is as follows:<br /><br />
<br />Grounded = false<br />	<br />	var attempts = 4<br />	<br />	while(is_colliding() and attempts):<br />		print(&quot;Colliding&quot;)<br />		var n = get_collision_normal()<br />		if (rad2deg(acos(, 1, 0)))) &lt; MAX_SLOPE_ANGLE):<br />				vel = get_collider_velocity()<br />				Grounded = true<br />		attempts -= 1<br />
<br /><br />The rest of the project can be found here:<br />

Tags :

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file