Quantcast
Channel: Questions in topic: "side-scrolling"
Viewing all articles
Browse latest Browse all 99

Why is my Player slowing down between two Tilemap Colliders?

$
0
0
Hi Guys,

I am currently working on a 2D sidescrolling action game - I've come pretty far, but i am currently stuck at a strange problem. When the player crouches I am **changing** from a **Box-Collider2D** (the size of the Player) to a certainly smaller **Circle-Collider2D** (the size of the Head). I am doing this change so the player can move on narrow paths that normally are too low. (I've provided a screenshot below) Now heres the actual problem with that: Somehow i am **colliding** with a collider (i am asuming the tilemap collider), which makes the player **slow down**. - but why?

![alt text][1]
I've already added a PhysicsMaterial with Friction = 0 to both colliders of the player. I am moving the player based on calcuating the velocity trough keyboard input and then applying that velocity to the rigidBody of the player with Vector3.SmoothDamp. With no Tilemap-Collider above the player everything works fine, so i dont see where the problem is.

Does somebody have an ideo what the problem is or what I am doing wrong? :D
Thanks in advance!
Erik
[1]: /storage/temp/155804-collider-problem.jpg

Viewing all articles
Browse latest Browse all 99

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>