I have two squares with Box Collider 2D components connected to them. When I add a dynamic Rigidbody 2D to the upper one it has no problems with the collision but when i change it into Kinematic and add this little script:
using UnityEngine;
public class Test : MonoBehaviour
{
void FixedUpdate()
{
Rigidbody2D rb = GetComponent<Rigidbody2D>();
rb.MovePosition(rb.position + new Vector2(0, -1f) * Time.fixedDeltaTime);
}
}
it does not want to collide with the second square. If i change the body type back to Dynamic and lock the Z rotation it it works fine again but it feels like that is not the right way to do this.