Search Issue Tracker
By Design
Votes
5
Found in
4.3.0b6
Issue ID
570326
Regression
No
OnCollisionExit2D doesn't work
To reproduce:
1. Open my attached project
2. Run the scene
3. Move the game object with arrow keys
4. Observe that there are no log messages when the object drops down from a platform
--------------------
Why is it by design?
When you adjust the position, rotation, scale or parent directly you are warping the object through space which the physics system doesn't support. When you do any of these operations then you will not get the resultant "end" calls and cause other side-effects.
If you output something in "OnCollisionEnter2D" you will see it is continually entering the collision because you are effectively repositioning the object in the enter callback. You should not do this.
You are adding a force rather than setting the position directly for this very reason.
Adjusting the parent in the collision callbacks is the problem and all transform related operations should be avoided when physics objects are involved.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- ArgumentOutOfRangeException when manipulating the Project Settings search bar
- [Linux] Touch freezes in Player when any mouse button is clicked
- UnityEngine.Rendering.Volume.OnEnable() is called twice before OnDisable() creating multiple copies of the same volume when a volume is enabled right after Domain Reload when entering Play Mode
- Hinge Joint transforms are reset when toggling the "useMotor" property
- Motion Vector texture reports incorrect Mesh data when Mesh is coming from off-screen
cbanklee12
Aug 18, 2020 22:55
https://giphy.com/channel/Naijmag
https://influence.co/naijmag
https://www.sbnation.com/users/Naijmag
https://www.againstallenemies.com/users/naijmag
https://www.allaboutthejersey.com/users/naijmag
https://www.allforxi.com/users/naijmag
https://www.acmepackingcompany.com/users/naijmag
https://www.addictedtoquack.com/users/naijmag
https://www.alligatorarmy.com/users/naijmag
https://www.amazinavenue.com/users/naijmag
https://www.americanninjawarriornation.com/users/naijmag
https://www.anaheimcalling.com/users/naijmag
https://www.anchorofgold.com/users/naijmag
https://www.anddownthestretchtheycome.com/users/naijmag
https://www.angelsonparade.com/users/naijmag
https://www.anonymouseagle.com/users/naijmag
https://www.arcticicehockey.com/users/naijmag
https://www.arkansasfight.com/users/naijmag
https://www.arrowheadpride.com/users/naijmag
https://www.aseaofblue.com/users/naijmag
https://www.athleticsnation.com/users/naijmag
https://www.azdesertswarm.com/users/naijmag
https://www.azsnakepit.com/users/naijmag
https://www.backingthepack.com/users/naijmag
https://www.badlefthook.com/users/naijmag
https://www.baltimorebeatdown.com/users/naijmag
https://www.bannersociety.com/users/naijmag
https://www.bannersontheparkway.com/users/naijmag
https://www.barcablaugranes.com/users/naijmag
https://www.barkingcarnival.com/users/naijmag
https://www.bigdsoccer.com/users/naijmag
https://www.cagesideseats.com/users/naijmag
https://www.californiagoldenblogs.com/users/naijmag
https://www.camdenchat.com/users/naijmag
https://www.canalstreetchronicles.com/users/naijmag
https://www.canescountry.com/users/naijmag
https://www.canishoopus.com/users/naijmag
https://www.cardchronicle.com/users/naijmag
https://www.cardiachill.com/users/naijmag
https://www.casualhoya.com/users/naijmag
https://www.catscratchreader.com/users/naijmag
https://www.celticsblog.com/users/naijmag
https://www.centerlinesoccer.com/users/naijmag
https://www.chiesaditotti.com/users/naijmag
https://www.cincyjungle.com/users/naijmag
https://www.clipsnation.com/users/naijmag
https://www.collegeandmagnolia.com/users/naijmag
https://www.collegecrosse.com/users/naijmag
https://www.conquestchronicles.com/users/naijmag
https://www.coppernblue.com/users/naijmag
https://www.cornnation.com/users/naijmag
https://www.cougcenter.com/users/naijmag
https://www.cowboysrideforfree.com/users/naijmag
https://www.crawfishboxes.com/users/naijmag
https://www.crimsonandcreammachine.com/users/naijmag
https://www.crimsonquarry.com/users/naijmag
https://www.curbed.com/users/naijmag
https://www.dailynorseman.com/users/naijmag
https://www.dawgsbynature.com/users/naijmag
https://www.dawgsports.com/users/naijmag
https://www.defendingbigd.com/users/naijmag
https://www.denverstiffs.com/users/naijmag
https://www.detroitbadboys.com/users/naijmag
https://www.diebytheblade.com/users/naijmag
https://www.dirtysouthsoccer.com/users/naijmag
https://www.downthedrive.com/users/naijmag
https://www.draysbay.com/users/naijmag
https://www.dukebasketballreport.com/users/naijmag
https://www.dynamotheory.com/users/naijmag
https://www.eater.com/users/naijmag
https://www.eightysixforever.com/users/naijmag
https://www.epluribusloonum.com/users/naijmag
https://www.everydayshouldbesaturday.com/users/naijmag
https://www.faketeams.com/users/naijmag
https://www.fearthefin.com/users/naijmag
https://www.fearthesword.com/users/naijmag
https://www.fearthewall.com/users/naijmag
https://www.federalbaseball.com/users/naijmag
https://www.fieldgulls.com/users/naijmag
https://www.fishstripes.com/users/naijmag
https://www.fiveforhowling.com/users/naijmag
https://www.fmfstateofmind.com/users/naijmag
https://www.footballstudyhall.com/users/naijmag
https://www.forwhomthecowbelltolls.com/users/naijmag
https://www.frogsowar.com/users/naijmag
https://www.fromtherumbleseat.com/users/naijmag
https://www.futnation.com/users/naijmag
https://www.ganggreennation.com/users/naijmag
https://www.garnetandblackattack.com/users/naijmag
https://www.gaslampball.com/users/naijmag
https://www.gobblercountry.com/users/naijmag
https://www.goldenstateofmind.com/users/naijmag
https://www.goodbullhunting.com/users/naijmag
https://www.grizzlybearblues.com/users/naijmag
https://www.habseyesontheprize.com/users/naijmag
https://www.halosheaven.com/users/naijmag
https://www.hammerandrails.com/users/naijmag
https://www.hockeywilderness.com/users/naijmag
https://www.hogshaven.com/users/naijmag
https://www.hothothoops.com/users/naijmag
https://www.hottimeinoldtown.com/users/naijmag
https://www.houseofsparky.com/users/naijmag
https://www.hudsonriverblue.com/users/naijmag
https://www.hustlebelt.com/users/naijmag
https://www.indomitablecitysoccer.com/users/naijmag
https://www.indycornrows.com/users/naijmag
https://www.insidenu.com/users/naijmag
https://www.intothecalderon.com/users/naijmag
https://www.jacketscannon.com/users/naijmag
https://www.japersrink.com/users/naijmag
https://www.jerseydoesntshrink.com/users/naijmag
https://www.jewelsfromthecrown.com/users/naijmag
https://www.knightsonice.com/users/naijmag
https://www.lagconfidential.com/users/naijmag
https://www.landgrantholyland.com/users/naijmag
https://www.letsgotribe.com/users/naijmag
https://www.libertyballers.com/users/naijmag
https://www.lighthousehockey.com/users/naijmag
https://www.litterboxcats.com/users/naijmag
https://www.lonestarball.com/users/naijmag
https://www.lookoutlanding.com/users/naijmag
https://www.maizenbrew.com/users/naijmag
https://www.managingmadrid.com/users/naijmag
https://www.massivereport.com/users/naijmag
https://www.mavsmoneyball.com/users/naijmag
https://www.mccoveychronicles.com/users/naijmag
https://www.midmajormadness.com/users/naijmag
https://www.milehighhockey.com/users/naijmag
https://www.milehighreport.com/users/naijmag
https://www.minerrush.com/users/naijmag
https://www.minorleagueball.com/users/naijmag
https://www.mlbdailydish.com/users/naijmag
https://www.mmafighting.com/users/naijmag
https://www.mmamania.com/users/naijmag
https://www.mountroyalsoccer.com/users/naijmag
https://www.musiccitymiracles.com/users/naijmag
https://www.mwcconnection.com/users/naijmag
https://www.netsdaily.com/users/naijmag
https://www.nevermanagealone.com/users/naijmag
https://www.ninersnation.com/users/naijmag
https://www.nucksmisconduct.com/users/naijmag
https://www.nunesmagician.com/users/naijmag
https://www.obnug.com/users/naijmag
https://www.offtackleempire.com/users/naijmag
https://www.onceametro.com/users/naijmag
https://www.onefootdown.com/users/naijmag
https://www.onthebanks.com/users/naijmag
https://www.ontheforecheck.com/users/naijmag
https://www.orlandopinstripedpost.com/users/naijmag
https://www.ourdailybears.com/users/naijmag
https://www.outsports.com/users/naijmag
https://www.overthemonster.com/users/naijmag
https://www.pacifictakes.com/users/naijmag
https://www.patspulpit.com/users/naijmag
https://www.peachtreehoops.com/users/naijmag
https://www.pensburgh.com/users/naijmag
https://www.pensionplanpuppets.com/users/naijmag
https://www.pinstripealley.com/users/naijmag
https://www.podiumcafe.com/users/naijmag
https://www.polygon.com/users/naijmag
https://www.postingandtoasting.com/users/naijmag
https://www.poundingtherock.com/users/naijmag
https://www.prideofdetroit.com/users/naijmag
https://www.progressiveboink.com/users/naijmag
https://www.purplerow.com/users/naijmag
https://www.ralphiereport.com/users/naijmag
https://www.raptorshq.com/users/naijmag
https://www.rawcharge.com/users/naijmag
https://www.redcuprebellion.com/users/naijmag
https://www.redreporter.com/users/naijmag
https://www.revengeofthebirds.com/users/naijmag
https://www.ridiculousupside.com/users/naijmag
https://www.rockchalktalk.com/users/naijmag
https://www.rockmnation.com/users/naijmag
https://www.rockytoptalk.com/users/naijmag
https://www.rollbamaroll.com/users/naijmag
https://www.royalsreview.com/users/naijmag
https://www.rslsoapbox.com/users/naijmag
https://www.ruleoftree.com/users/naijmag
https://www.rumbleinthegarden.com/users/naijmag
https://www.sactownroyalty.com/users/naijmag
https://www.sbnation.com/users/naijmag
https://www.sbncollegehockey.com/users/naijmag
https://www.secondcityhockey.com/users/naijmag
https://www.serpentsofmadonnina.com/users/naijmag
https://www.shakinthesouthland.com/users/naijmag
https://www.silverandblackpride.com/users/naijmag
https://www.silverscreenandroll.com/users/naijmag
https://www.silversevensens.com/users/naijmag
https://www.slcdunk.com/users/naijmag
https://www.slipperstillfits.com/users/naijmag
https://www.smokingmusket.com/users/naijmag
https://www.sonicsrising.com/users/naijmag
https://www.sounderatheart.com/users/naijmag
https://www.southsidesox.com/users/naijmag
https://www.stampedeblue.com/users/naijmag
https://www.stanleycupofchowder.com/users/naijmag
https://www.starsandstripesfc.com/users/naijmag
https://www.stateoftheu.com/users/naijmag
https://www.stlouisgametime.com/users/naijmag
https://www.streakingthelawn.com/users/naijmag
https://www.stridenation.com/users/naijmag
https://www.stumptownfooty.com/users/naijmag
https://www.swishappeal.com/users/naijmag
https://www.talkingchop.com/users/naijmag
https://www.tarheelblog.com/users/naijmag
https://www.teamspeedkills.com/users/naijmag
https://www.testudotimes.com/users/naijmag
https://www.thebentmusket.com/users/naijmag
https://www.thebirdwrites.com/users/naijmag
https://www.thebluetestament.com/users/naijmag
https://www.thechampaignroom.com/users/naijmag
https://www.thedailygopher.com/users/naijmag
https://www.thedailystampede.com/users/naijmag
https://www.thedreamshake.com/users/naijmag
https://www.thefalcoholic.com/users/naijmag
https://www.thegoodphight.com/users/naijmag
https://www.theicegarden.com/users/naijmag
https://www.themaneland.com/users/naijmag
https://www.theonlycolors.com/users/naijmag
https://www.thephinsider.com/users/naijmag
https://www.thesirenssong.com/users/naijmag
https://www.theuconnblog.com/users/naijmag
https://www.theverge.com/users/naijmag
https://www.threelionsroar.com/users/naijmag
https://www.tomahawknation.com/users/naijmag
https://www.truebluela.com/users/naijmag
https://www.turfshowtimes.com/users/naijmag
https://www.twiceacosmo.com/users/naijmag
https://www.twinkietown.com/users/naijmag
https://www.ubbullrun.com/users/naijmag
https://www.underdogdynasty.com/users/naijmag
https://www.uwdawgpound.com/users/naijmag
https://www.vanquishthefoe.com/users/naijmag
https://www.villarrealusa.com/users/naijmag
https://www.violanation.com/users/naijmag
https://www.vivaelbirdos.com/users/naijmag
https://www.vivathematadors.com/users/naijmag
https://www.vox.com/users/naiimag
https://www.voxmedia.com/users/naijmag
https://www.vuhoops.com/users/naijmag
https://www.wakingthered.com/users/naijmag
https://www.welcometoloudcity.com/users/naijmag
https://www.widerightnattylite.com/users/naijmag
https://www.windycitygridiron.com/users/naijmag
https://www.wingingitinmotown.com/users/naijmag
https://acmilan.theoffside.com/users/naijmag
twoski
Apr 03, 2014 15:14
The same occurs for me. I have a rigid body with a collider and it only seems to call the exit function once and never again.
WhyCantIUseMyLogin
Dec 07, 2013 13:10
I also echo this problem… I have Rigidbody2d that generate an OnCollisionEnter2D, but no OnCollisionExit2D event.