I've been trying to figure this out exhaustively for the past few days and still haven't found an answer. I have an endless runner built using swift where the character is fixed and the terrain moves to the left. I have edge physics bodies on the terrain, and edge physics bodies that go up and down slopes.
The problem is, if I want my character to collide with the ground without being pushed back by it, since the only thing that can make contact with an edge is a dynamic volume.
My goal is to keep the character level with the terrain, (assuming they're not jumping). Even on slopes.
I've tried ray casting using enumeratebodiesalongraystart, but can't seem to figure out how to get coordinates of where it intersects with the ground. I've tried having an edge body that is vertical, that intersects with the ground(two edge bodies cannot make contact in sprite kit). I've tried dynamic volumes. I've tried Static volumes. Nothing works. I'm not posting code here since I'm really just looking for a general answer to sort of point me in the right direction, but I'm coding in swift. Thanks in advance. Also I have the character in a different bitmaskcatagory than the terrain catagory and they are set up to recognize each other, and do if one of them is a dynamic volume physics body.