I'm having a very strange problem in 3.5 stable, Ive been working on my project for months but this just started happening a few days ago. There's two issues:

  1. move_and_slide() causes a kinematic body to slide(no incline) when called with Vector3.zero
  2. move_and_slide() moves the kinematic body in the opposite direction than it's supposed to

The strangest thing of this all is that it's not happening with all objects. I have other kinematic bodies in my project that it's not happening to. Those operate fine. It's a particular class only that's exhibiting this behavior.

Is there some object property or editor property that may cause objects to move in the polar opposite direction from what's sent to move_and_slide()?

Some of you like to see code. Well here's the code where I'm seeing the issue, but it's not very helpful.

func _physics_process(delta):
	if name == "zombieb":
		move_and_slide(Vector3.ZERO, Vector3(0, 1, 0), true)

The object should be still but it's sliding across the ground. Only way to prevent is to remove move_and_slide. Anyone else experienced something similar?

friendMaster2000 Not even in _process()?

https://docs.godotengine.org/en/stable/classes/class_kinematicbody2d.html#class-kinematicbody2d-method-move-and-slide

If stop_on_slope is true, body will not slide on slopes when you include gravity in linear_velocity and the body is standing still.

If this doesn't solve it then it might help to also experiment with setting the floor_max_angle to some custom value.

    5 days later

    I finally figured this one out. For anyone experiencing the same issue in the future, the problem occurs when you have multiple collision bodies overlapping each other within a kinematic body parent node. In my case, I needed a separate staticbody and collision shape for the zombie head, in order to register head shots separately. Repositioning the overlapping collision nodes so theyre no longer overlapping fixed the problem. I've posted a bug about this issue.