Godot Version
4.x
Hello,
I´m just programing for fun so I need you to be kind.
I am trying to do special movement on slopes.(2D Tilemap)
What I want:
1Constant Speed/ velocity to the right side, even when on slope e.g. every delta 20 pixel to the right even when on slope: onFloor: position = position+(20,0) onSlope: position = position + (20,-10)
2 When a signal comes in stop the movement. No sliding back or forward on slopes (easy in characterbody2d),
2.2But rotation does still work, so when a specific point reaches the end of an upward slope, it becomes horizontal even with the signal.
Rotation like in the pictures. on slope
3 Constant conection to the ground even with an extrem speed and a ramp it cannot loose every connection to the ground, just parts of it can.
I did it with a butchered characterbody2d code and a million raycasts(we have no spherical raycasts) to simulate what the rigidbody does with gravity, physic and center. But it crashes sometimes and i have to code everything without logic, because of the weird form of my Node.
i tried it with rigidbody and a constant velocity via the state override, but it slides on slopes and in the end it bounce a little bit left and right.
i tried every video tutorial and every option but i simply cannot do it without help.
At this point i am done. I totally accept every tip for both(RigidBody and Characterbody) the useage of on of them for the Rest of my Project depends on the best solution