I had a quick question about collisions. I am using platypus to control the character movement and collisions. I have inclined collision boxes, they are ramps. When the character jumps up on the ramp it does not walk up it, rather through it on the same plane it was initially on. How can I make it so that it walks up the ramp rather than through?
Hey, thanks for your response.
The collision box is high enough, the issue arrises when I try to have the player walk up the ramp. it doesn’t, rather it walks through…
As I remember, the Platypus’ characher has a rectangle collider. I believe that the leg’ body in physic based games should be represents as a circle. And rorate circle with pivot joint aka wheel is ideal.
Btw, a visual example should helps to understand the problem.
Platypus uses ray casts to handle most of the collision detection. You need to configure the rays to match the size of the collision shape. You can visualize the ray casts by enabling the debug value when calling platypus.create(). You configure the rays from the collisions table in the config. More here:
I have had the rays configured and they are the same size as the collision box. I checked out the grottoscape example to try and see if there is anything about it that allows for the player to walk up ramps but I cant find anything. Is there any code or anything else I may be missing?
The issue might be that the platforms are not applying any upward force, I am not seeing the upward arrows, only downward arrows, in the debug.
Edit: the player can walk up a ramp if it is a tile, but not a regular gameobject with a regular collision box.
The spot I am mainly looking at is the branch right above where the character spawns, you can double jump to get on it, for some reason the character can’t walk up it.
I’ve transitioned from using collision shapes to ray casts for all collision detection as that is a lot more reliable. I’ve also made several changes to the implementation and slopes is now working (as long as they are not too steep).