The One Way Effector doesn't ignore horizontal collisions, and only ignores vertical collisions while the colliding object is travelling upwards. When an object's upward momentum is not great enough to clear the platform the Effector kicks in and violently pushes the object away, or, if the object has multiple colliders (like the Standard Assets Platformer Character) it may get stuck half-way through. This may be the very literal description of a one-way collider, but in practice it's not very useful.
I made numerous attempts to create a better One Way Platform and in the end I settled on the simplest solution. My method utilizes a Trigger Collider on the character(s), and a Tag on the One Way Platforms.
Note: Rather than using tags, an alternative method would instead assign One Way Platforms to a specific layer. The code would then compare the layer instead of the tag. The benefit to this would be to easily allow certain objects (like projectiles or flying characters) to completely ignore One Way Platforms via Physics2DSettings > LayerCollisionMatrix.
using UnityEngine; using System.Collections.Generic; [RequireComponent (typeof (Collider2D))] public class OneWayController : MonoBehaviour { public String m_OneWayTag = "OneWayPlatform"; //Tag to use for one way platforms List <Collider2D> m_ActorColliders; //List of colliders on this character void Awake () { //Cache refrences to this character's colliders in a list m_ActorColliders = new List<Collider2D>(); Collider2D[] colliders = GetComponents<Collider2D>(); for (int i = 0; i < colliders.Length; i++) { //Exclude the one way trigger from the collider list if (!colliders[i].isTrigger) m_ActorColliders.Add(colliders[i]); } } void OnTriggerEnter2D (Collider2D other) { //When a platform with the one way tag enters the trigger //ignore collisions between it and this character if (other.Tag == m_OneWayTag) { for (int i = 0; i < m_ActorColliders.Count; i++) { Physics2D.IgnoreCollision(other, m_ActorColliders[i], true); } } } void OnTriggerExit2D (Collider2D other) { //When the platform exits the trigger re-enable collisions if (other.Tag == m_OneWayTag) { for (int i = 0; i < m_ActorColliders.Count; i++) { Physics2D.IgnoreCollision(other, m_ActorColliders[i], false); } } } }
|
The result is One Way Platforms that allow characters to pass through them on three sides without interruption. The only drawback is that raycasts could be blocked by the trigger colliders on characters, if that is an issue you can go to Edit > Project Settings > Physics 2D > and uncheck "Raycasts Hit Triggers".
if I had the money I would hire Off Site SEO out. If I didn't have the money (which I don’t) I would focus on building relevant links to my site. I would rotate between 10 or so different anchor texts but I would be heavy on my main 1 or 2 terms. These are the different types of links I would focus on getting. 1 Ways links, Recips, 3 Ways, Article, Directory (free and a select few paid), Forum Sigs, Offsite Blogs, Blog Comments, and Press Releases. Webdesign
ReplyDeleteIt is true that 44% of small businesses do not have a website or blog. They are unable to reach 73% of Internet users each day. If your company has a website, customers can research the latest products the business owner's company offers. Webdesign Limburg
ReplyDeleteIf you do not have a logo or anything by which your customers currently know you, do you have any ideas about what you might like, a sketch, a doodle or something similar? Whatever the case, usually a professional web design company can design a professional logo for you or reuse your current one. Webdesignbetaalbaar.be
ReplyDeleteIt calls for countless hours in front of a computer, learning, reading tutorials, and trial and error until you get it down. But learning is only the beginning now you have to make a portfolio, and look for work. The competition on free lance job boards is fierce. Webdesignprofessioneel.be
ReplyDeleteGood website! I truly love how it is easy on my eyes it is. I am wondering how I might be notified whenever a new post has been made. I have subscribed to your RSS which may do the trick? Have a great day! top software tools for writers
ReplyDeleteThe writer has outdone himself this time. It is not at all enough; the website is also utmost perfect. I will never forget to visit your site again and again. https://fmovies.group
ReplyDeleteYou know your projects stand out of the herd. There is something special about them. It seems to me all of them are really brilliant! https://couchtuner-hd.com
ReplyDeleteI found this is an informative and interesting post so i think so it is very useful and knowledgeable. I would like to thank you for the efforts you have made in writing this article. https://putlocker-live.org
ReplyDeleteKeep up the good work; I read few posts on this website, including I consider that your blog is fascinating and has sets of the fantastic piece of information. Thanks for your valuable efforts. https://solarmovies.video
ReplyDeleteWow, excellent post. I'd like to draft like this too - taking time and real hard work to make a great article. This post has encouraged me to write some posts that I am going to write soon. https://soap2day.digital
ReplyDeleteThis was a really great contest and hopefully I can attend the next one. It was alot of fun and I really enjoyed myself.. https://megashare-website.com
ReplyDeleteVery nice article, I enjoyed reading your post, very nice share, I want to twit this to my followers. Thanks!. https://solarmovies.cloud
ReplyDeleteMost of the time I don’t make comments on websites, but I'd like to say that this article really forced me to do so. Really nice post! https://rainierland.live
ReplyDeleteAdmiring the time and effort you put into your blog and detailed information you offer!.. https://primewire.today
ReplyDeleteGreat write-up, I am a big believer in commenting on blogs to inform the blog writers know that they’ve added something worthwhile to the world wide web!.. https://primewire-movies.com
ReplyDeleteThis is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free https://xmovies8.one
ReplyDeleteNice post. I was checking constantly this blog and I’m impressed! Extremely useful info specially the last part I care for such information a lot. I was seeking this certain info for a long time. Thank you and good luck. https://vexmovies.pw
ReplyDeleteYes i am totally agreed with this article and i just want say that this article is very nice and very informative article.I will make sure to be reading your blog more. You made a good point but I can't help but wonder, what about the other side? !!!!!!THANKS!!!!!! https://losmoviess.com
ReplyDeleteI am glad you take pride in what you write. This makes you stand way out from many other writers that push poorly written content. https://putlocker.quest
ReplyDeleteI think this is an informative post and it is very beneficial and knowledgeable. Therefore, I would like to thank you for the endeavors that you have made in writing this article. All the content is absolutely well-researched. Thanks... https://putlocker.work
ReplyDeletePositive site, where did u come up with the information on this posting?I have read a few of the articles on your website now, and I really like your style. Thanks a million and please keep up the effective work. https://projectfreetv.space/
ReplyDeleteI think that thanks for the valuabe information and insights you have so provided here. https://y-ymovies.com
ReplyDeleteHi there! Nice material, do keep me posted when you post something like this again! I will visit this blog leaps and bounds for more quality posts like it. Thanks... https://vumoo.vip
ReplyDeleteThis is a great inspiring article.I am pretty much pleased with your good work.You put really very helpful information. Keep it up. Keep blogging. Looking to reading your next post. https://solar-movies.one
ReplyDeleteKeep up the good work; I read few posts on this website, including I consider that your blog is fascinating and has sets of the fantastic piece of information. Thanks for your valuable efforts. https://aafdah.org
ReplyDeleteAttractive, post. I just stumbled upon your weblog and wanted to say that I have liked browsing your blog posts. After all, I will surely subscribe to your feed, and I hope you will write again soon! https://currentputlocker.site
ReplyDeletePretty nice post. I just stumbled upon your weblog and wanted to say that I have really enjoyed browsing your blog posts. After all I’ll be subscribing to your feed and I hope you write again soon https://thecouchtuner.space
ReplyDeleteExcellent article. Very interesting to read. I really love to read such a nice article. Thanks! keep rocking. https://soap2daymovies.website
ReplyDeleteThanks for picking out the time to discuss this, I feel great about it and love studying more on this topic. It is extremely helpful for me. Thanks for such a valuable help again. https://123moviesnow.space
ReplyDeleteWonderful blog! Do you have any tips and hints for aspiring writers? Because I’m going to start my website soon, but I’m a little lost on everything. Many thanks! https://1solarmovies.site
ReplyDeleteYou know your projects stand out of the herd. There is something special about them. It seems to me all of them are really brilliant! https://putlocker-movies.space
ReplyDeleteWithout fail, your writing style is top professional; even your website also looks amazing thank you for posting. https://la-123movies.one
ReplyDeleteThis is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. https://123putlocker.website
ReplyDeleteI found that site very usefull and this survey is very cirious, I ' ve never seen a blog that demand a survey for this actions, very curious https://soap2day.shop
ReplyDeleteRemarkable article, it is particularly useful! I quietly began in this, and I'm becoming more acquainted with it better! Delights, keep doing more and extra impressive https://soap2day.monster
ReplyDeleteKeep up the good work , I read few posts on this web site and I conceive that your blog is very interesting and has sets of fantastic information. https://putlockertv.one
ReplyDeleteThe website is looking bit flashy and it catches the visitors eyes. Design is pretty simple and a good user friendly interface. https://solarmovies.space
ReplyDeleteGreat job for publishing such a beneficial web site. Your web log isn’t only useful but it is additionally really creative too. https://soaptoday.website
ReplyDeleteRemarkable article, it is particularly useful! I quietly began in this, and I'm becoming more acquainted with it better! Delights, keep doing more and extra impressive https://soaptoday.space
ReplyDeleteFabulous post, you have denoted out some fantastic points, I likewise think this s a very wonderful website. I will visit again for more quality contents and also, recommend this site to all. Thanks. https://movies123.win
ReplyDeleteKeep up the good work; I read few posts on this website, including I consider that your blog is fascinating and has sets of the fantastic piece of information. Thanks for your valuable efforts. https://go123movies.site
ReplyDeleteRemarkable article, it is particularly useful! I quietly began in this, and I'm becoming more acquainted with it better! Delights, keep doing more and extra impressive! https://newputlocker.website
ReplyDeleteThis article was written by a real thinking writer without a doubt. I agree many of the with the solid points made by the writer. I’ll be back day in and day for further new updates. https://thesolarmovies.space
ReplyDeleteRemarkable article, it is particularly useful! I quietly began in this, and I'm becoming more acquainted with it better! Delights, keep doing more and extra impressive https://watchcouchtuner.space
ReplyDeletei love reading this article so beautiful!!great job! indian visa application
ReplyDeletei really like this article please keep it up. UNITED STATES TOURIST VISA
ReplyDeleteThis is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. 토토사이트
ReplyDeleteThanks for the blog loaded with so many information. Stopping by your blog helped me to get what I was looking for. Canada Visa Online
ReplyDeleteA very awesome blog post. We are really grateful for your blog post. You will find a lot of approaches after visiting your post. 토토커뮤니티
ReplyDeleteIt is somewhat fantastic, and yet check out the advice at this treat. UNITED STATES VISA FOR SPANISH CITIZENS
ReplyDeletehi was just seeing if you minded a comment. i like your website and the thme you picked is super. I will be back. INDISK VISUM TIL FORRETNINGSMØDE
ReplyDeleteThere you will then see the most important thing, the application provides you a website a powerful important internet page: VISA PERNIAGAAN INDIA
ReplyDeleteThanks for sharing us. Best Residential Roofers Near Me
ReplyDeleteExcellent article. Very interesting to read. I really love to read such a nice article. Thanks! keep rocking. Domanda di visto per il Canada
ReplyDeleteThank you for some other informative website. The place else may just I get that kind of information written in such a perfect method? I have a venture that I am simply now running on, and I’ve been at the glance out for such info. http://www.cantorburger.com/2021/02/06/make-money-easy-with-this-online-cards-game/
ReplyDeleteWhat a fantabulous post this has been. Never seen this kind of useful post. I am grateful to you and expect more number of posts like these. Thank you very much. BUSINESS VISA FOR INDIA
ReplyDeleteYour texts on this subject are correct, see how I wrote this site is very good. fusible interlining fabric
ReplyDeleteThere is so much in this article that I would never have thought of on my own. Your content gives readers things to think about interestingly. good iptv
ReplyDeleteGives you the best website address I know there alone you'll find how easy it is. link pos4d
ReplyDeleteI love the way you write and share your niche! Very interesting and different! Keep it coming! Roblox Shirt Template
ReplyDeleteBirthday Decoration Order Birthday Balloon Decoration Online in City . Get Upto 50% Off on All Packages For Birthday Anniversary Baby shower Romantic Room Decoration. Birthday Decoration 100% Customer Satisfaction Guranteed..
ReplyDeleteDigital Kumar is based in Delhi/NCR, A Top-rated partner with Amazon Service Provider Network (SPN) and Flipkart that enables sellers to sell their products online. We have overseen accounts in 10+ categories and generated crores of revenue. We provide the below services: Amazon listing services, Amazon product listing services, Amazon account management, Amazon account management services, and Amazon seller account suspended.
ReplyDeleteI came onto your blog while focusing just slightly submits. Nice strategy for next, I will be bookmarking at once seize your complete rises... red boost supplement
ReplyDeleteKheloyar stands as India's most reliable online gaming platform. Enjoy a swift 50% welcome bonus alo
ReplyDelete