If a vertical ray hits a Collider2D, we’ve hit the ground or the ceiling. If a horizontal laser hits a Collider2D, then we’ve probably hit a slope, or a wall (in the context of the engine, any slope more than 45° strong). Basically how it works is that the controller is casting small rays all around itself, like tiny lasers. To handle collisions, the Corgi Controller uses Collider2Ds (any type, BoxCollider2D, CircleCollider2D, PolygonCollider2D…) and raycasts, which you can see in the scene view when playing your game. You’ll be able to add or set forces to it, usually via Character Abilities, which will make it move. Its main function is to handle collisions, and basic movement. The Corgi Controller is at the heart of this system. Note that this is absolutely not a physics engine, this is not compatible with regular Unity physics, and if you’re planning on recreating Angry Birds, this will not do the trick. To do so, the engine implements its own “physics” : collision detection, movement, etc. The Corgi Engine was created as an alternative to physics based platformers, aiming to provide a tighter gameplay, faster, and more predictable than physics.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |