Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(6 edits) (+1)

Yup! this is indeed RigidBody2D physics (Using Unity for the 1st time, so bear with me on this explanation lol)! I use raycasts for detecting the ground with the player. I tried a box collider at first, but there was an issue where the player would not be able to detect the ground at times, and it prevented jumping. I ended up using 3 raycasts -- one in the center of the character pointing down, and 1 on each end of the character pointing down (not fully at the end of the player). this allowed me to detect the ground, and get the "coyote jump" effect to make sure my player control was smooth. Granted the only player control was space bar.. But still raycasts with rigid body works really well for me. 

The crown is also a rigid body with no raycasts, it just sits on top of the character. I need to look at my code, but essentially I made the mass of the crown 1000x less than the player mass (or something like that), that way the crown would not limit the player's full jump height (well it does, but it's very very unnoticeable).

Thanks for asking!

(+1)

nice!