I’m creating some critters to fill the world of my game.
I’m trying to figure out how to make the mouse in the picture
to rotate automatically on my slope.
Problem is that i can’t check the angles because are Tiled slopes.I already have the AI which will make things move around but the object’s angles are giving me problems.
I was thinking to use some collision point in the mask to check the collision, so if is not it will rotate the object…but i suck at math…so i wonder if someone have a better method to share.
Thx in advance.
more infos:
-the mouse have platformer behaviour.
-untouched collisions box around the mouse silhouette
-origin is bottom middle
-tiles are 16x16px
From what i experienced; tiled sprites are no good for slopes. They get wonky with the positioning.
I use a hidden normal sprite for the platform and then another layer above that for visual graphics with no platform behaviour. If there’s a solution with tiled sprites i’d love to learn too.
The wiki tutorial works fine.
But here is my process:
-Create a terrain tileset in Tiled.
-Define in Tiled the collisions (there is an option for that). For slopes u must be veeeery precise at assigning points.
-after htat u just need to export as json and follow the wiki.
just remember that u gonna need 2 object in Gdevelop for each map.
The tiled object and the Tiledmask.
It can be very confusing at start…i know…but it works.
add platform behaviour to tiled collision mask.
and if you have a player object add the platformer behaviour with controls.
your player object should collide with the tiled mask. be sure to double check the collision for each object.
They must be squared collision box
Then bind the top down behaviour to your character.
It should work the same as long you see collisions of your tiled map mask.
try to check the debug option in your tiled map mask it should show collisions
There is no issue on platformer behaviour or in flip actions.
edit: i removed the platformer behaviour from the mouse and assigned it to a proxy box sprite cos the box must not rotate…cos…collisions