Home Creators Posts Import Register Favorites Logout
haven't archived this post yet. have a subscription? use the importer!

Content

Hey!

One of the things that haunted me for a long time when I was learning Unity was:


"Why the hell sometimes collision detection works and sometimes it doesn't?"


What I did not understand was the difference between Physics2D based movement and Transform movement. 

In this video (and part 2) we will explore how to make a platformer movement using:

-Dynamic RigidBody2D (using velocity and using forces)

-Kinematic Rigidbody2D

-when should we use Transform based movement.


I hope that you will find this tutorial useful ;)

-Peter


Files

Previews only

Comparing ways to move 2D objects in Unity Tutorial

In this tutorial we will compare RigidBody and Transform components and the ways those allows us to move our 2D objects in Unity on the example of a 2d platformer game. Our game will have a very different "Game feel" depending on if we will use a dynamic or kinematic rigidbody - that is if we care to detect collisions between objects. Otherwise we may stick to modifying the Transform directly. All of that we will explore in this video. Learn to make 2d games in Unity: https://courses.sunnyvalleystudio.com/ Collision matrix doc: https://docs.unity3d.com/Manual/CollidersOverview.html Join the discord: https://discord.gg/RQEtYHz You can support me through Patreon: https://www.patreon.com/sunnyvalleystudio Assets used: https://pixelfrog-assets.itch.io/treasure-hunters 00:00 Intro 00:27 Types of movement in Unity 01:08 Movement using Transform 02:00 Movement using Rigidbody2D 02:23 Collision action matrix 03:47 Dynamic vs Kinematic Rigidbody 04:35 AddForce() 06:09 Rigidbody2D.velocity 04:41 Kinematic Rigidbody 09:35 Fixing the "Why no collision?" problem 10:15 So when do we use Transform movement? 10:48 Learn how to make 2d games in Unity! #unity2d #rigidbody #collision

Comments

No comments found for this post.