Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by bassinastor · Feb 20, 2018 at 09:25 PM · collider2dtilemapplatformer

How to make one-way platforms using a tilemap?

I would like my game to have platforms that don't affect the player from the bottom or the sides, only on the top. I would also like to be able to make these platforms using a tilemap. I think I should be using a Platform Effector 2D, but I'm not sure how to apply this to a tilemap. I have a Tilemap Collider 2D, which is used by a Composite Collider 2D, which is used by a Platform Effector 2D, but the tiles just behave like normal tiles.

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image narshe · Mar 12, 2018 at 10:30 PM 0
Share

Did you ever figure this out?

avatar image firstlinestudio narshe · Apr 07, 2018 at 04:49 AM 0
Share

@narshe Try the solution I posted

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by firstlinestudio · Apr 07, 2018 at 04:49 AM

I think you simply need to remove the Composite Collider 2D and have your Tilemap Collider 2D use the Platform Effector 2D directly. You should also adjust your tile rules so that the collider type is changed from "sprite" to "none" for each tile you would like the player to ignore completely. You may be able to use the Platform Effector 2D through the Composite Collider 2D and just change the tile's collider state, but I have not tested that method yet.

alt text

alt text


2018-04-06-2.png (37.1 kB)
2018-04-06-3.png (47.4 kB)
Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image firstlinestudio · Apr 07, 2018 at 04:58 AM 0
Share

I recommend creating separate Tilemaps for regular platforms and one-way platforms (if you don't already do this). These Tilemaps can be attached to the same grid.

avatar image toad02 · Sep 19, 2020 at 11:41 AM 0
Share

This doesn't work for me because without composite collider I have many tiles, each of with it's own collision. As a result my character collides with the top and bottom of each of these tiles instead of just the top.

avatar image
0

Answer by ShadyProductions · Mar 12, 2018 at 10:37 PM

Faces in collision meshes are one-sided. This means objects can pass through them from one direction, but collide with them from the other.

With a MeshCollider you can generate your own faces, there is a detailed explanation here: http://studentgamedev.blogspot.be/2013/08/VoxelTutP2.html

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image firstlinestudio · Apr 07, 2018 at 04:50 AM 0
Share

@ShadyProductions Your answer offers good insight, but I am not sure it applies to the question

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

81 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Platform Effector 2D with rigidbody2D 0 Answers

Tilemap Collider/Composite Collider leaving gaps 2 Answers

tilemap has gaps 0 Answers

2d Tilemaps, pass through some objects 1 Answer

How to get the position of a Tile my Player collided with using OnTriggerEnter2D? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges