Unity - Object too fast for Collision - FIXED

Поделиться
HTML-код
  • Опубликовано: 14 янв 2025

Комментарии • 168

  • @markorossie9296
    @markorossie9296 4 года назад +54

    Even if its simple, its one of the best explained and clearly illustrated clip about collision with fast objects and walls. Thank you!

  • @DARK_AMBIGUOUS
    @DARK_AMBIGUOUS 3 года назад +111

    If objects are still going through other objects in your game even after setting the rigidbody to Continuous Dynamic, then I have finally found a solution after about a year of objects going through walls in my games, it turns out that I made everything in my game WAY to big. Apparently in unity the default 1x1x1 cube is supposed to be 1 cubic meter in size and everything in your game should be realistically sized, I had a problem where the gravity in my game was to low because I made everything way to big, and once I shrunk everything, it increased my games FPS and performance by a lot. The bigger everything in your game, the faster stuff moves which means the easier it is to go through stuff, setting rigidbodys from discrete to continuous dynamic does not make it impossible for stuff to go through other things, it just makes it a lot harder to the point where it appears like it’s impossible, but ridiculously fast things can still go through continuous dynamic rigidbodys, and when everything in your game is way to big, stuff moves a lot faster. Once I started realistically sizing everything in my game, I stopped having collision issues and it also fixed low gravity and performance issues I’ve been having and a lot of people don’t know about this. It took me about a year to find a solution to this problem

    • @1libagkulangot606
      @1libagkulangot606 2 года назад

      Thanks it worked!♥

    • @t-games7419
      @t-games7419 2 года назад

      But what when we have to create big objects???

    • @missing_the_texture
      @missing_the_texture 2 года назад

      thank you 🧡

    • @MrJackira
      @MrJackira Год назад +4

      Well damn that explains a lot but also kind of makes everything a lot harder for no good reason...

    • @WhoopyStick
      @WhoopyStick Год назад

      Thank JEEBUS for this. I was so very confused why nothing would work. Then I realized I actually sped up my continuous move providers because I was actually traveling a larger distance in order to make the movement speed accurate. If I used the default I would move slowly. But not once I scaled everything down. Thank you. THANK YOU. Thanks.

  • @sabaa.vahidi9097
    @sabaa.vahidi9097 4 года назад +22

    i face this issue while making my sniper game,bullets didnt hit the enemy, nice point.

    • @astatat8972
      @astatat8972 3 года назад

      I have this issue too, but this tutorial helped me a lot!!!

    • @alfaaz7146
      @alfaaz7146 3 года назад

      Exact same situation here. 😁

    • @Fenixmaiden666
      @Fenixmaiden666 2 года назад +2

      Not sure if you will read this, but you want to use a raycast for high speed bullets. Or that is one of the best ways I've found to do it. Calculate where the bullet will be and then shoot a raycast between that distance.

  • @RiHezBestSmiteMontages
    @RiHezBestSmiteMontages 4 года назад +9

    thanks for explaining this with such detail. My endless runner game is momentum based, and when jumping/sliding up against the side of the platforms the player would slightly go through the collision box and get stuck hitting the top of the hitbox from underneath. maybe if I just adjust the platforms to be continuous dynamic it would help, been an issue for a long time and feels really bad when this bug ends your highscore run lol

    • @RiHezBestSmiteMontages
      @RiHezBestSmiteMontages 4 года назад

      I took another go at the hitboxes and it seems to be better now. I used dynamic rigidbodys instead of kinematic, and edge colliders instead of box colliders. I think the edge colliders was one of the main fixes for me since my player would go into the box collider a little too far and lose speed hitting the inside edges

    • @user-og6hl6lv7p
      @user-og6hl6lv7p 4 года назад

      @@RiHezBestSmiteMontages this is unfortunately an issue that is near impossible to solve due to Unity's using plane based collision instead of polygonal based collision. The surface or angle that the collision detection returns is calculated relative to the moving object, it is not the ACTUAL surface of the collision. Doing so properly requires iterating through a given mesh's polygons (or triangles) and calculating the closest surface.

    • @DARK_AMBIGUOUS
      @DARK_AMBIGUOUS 2 года назад

      @@user-og6hl6lv7p the solution is that everything in your game is probably way to big, try to realistically size everything. A standard cube is 1 X 1 X 1 meters tall/wide/deep. Also this will improve performance, make everything realistically sized or smaller. I was stuck for almost like 9 months on this issue and I had to scrap my labyrinth game because I just couldn’t figure out how to fix this problem where stuff goes through other stuff, then I found out my labyrinth was realistically 72 miles long in real life or something like that. The ball was moving way to fast for my colliders to recognize it and that’s why stuff would go through other stuff

  • @NathanTheCraziest
    @NathanTheCraziest 2 года назад

    THANK YOU SO MUCH I WAS LOOKED THROUGH EVERY PLANET, GALAXY, UNIVERSE BUT STILL COULDNT FIND A SOLUTION UNTIL I FOUND THIS THANK YOU, THANK YOU SO MUCH

  • @SebastianGraves
    @SebastianGraves 3 года назад +2

    Excellent. Very simple and well illustrated.

  • @Othello379
    @Othello379 4 года назад +9

    Thank you! This was exactly what i was searching for! :)

  • @nguyenviethung7311
    @nguyenviethung7311 2 года назад +1

    thank you man, you saved my sanity

  • @DARK_AMBIGUOUS
    @DARK_AMBIGUOUS 3 года назад +8

    Every game I’ve ever made still has this problem, stuff keeps going through other stuff, the player can run through walls. I’ve tried every combination of continuous, continuous dynamic, continuous speculative, discrete, and I tried adding and removing ridged bodies and turning on and off static and nothing is working, I even just got a new computer and I just started making a new game and I still have this issue and I have continuous on but my player still goes through walls when I run, please help. I’ve tried everything

    • @dmrdev9934
      @dmrdev9934 3 года назад

      use raycast or spherecast detection most stable way to calculate fast projectiles

    • @DARK_AMBIGUOUS
      @DARK_AMBIGUOUS 3 года назад

      I think I actually figured out a solution if continuous dynamic still doesn’t work, I think either everything in your game might be too big so that whenever something is moving, it’s moving way faster than you think, try making everything in your game smaller, use a standard 1x1x1 cube as reference and think of it as being 1 meter tall

  • @sameedulhussanasif1456
    @sameedulhussanasif1456 3 года назад +3

    Are You using transform.translate or Add Force

  • @BrainSlugs83
    @BrainSlugs83 2 года назад +2

    Why does the cube only need continuous and not continuous dynamic like the wall?

  • @GabeStott
    @GabeStott 3 года назад +5

    anyone still having issues as I was. Do this:
    Time.fixedDeltaTime = Time.timeScale * 0.01f; // Normally multiplied by 0.02 to make 50 checks a second.
    This doubles the number of times per second the fixedUpdate will run. You can keep decreasing the multiplier to increase number of checks.
    fixedUpdate is responsible for handling physics updates.
    Bare in mind if you have a physics heavy game with many physics objects you will see a dramatic reduction in performance so use this wisely at your own risk.

    • @DARK_AMBIGUOUS
      @DARK_AMBIGUOUS 3 года назад +1

      Or if you still have this problem, everything in your game is way to big, make a new cube and use it as size reference because a new cube is 1 meter tall. If everything is way to big than stuff will go through other stuff

    • @ABlake77
      @ABlake77 Год назад +1

      Awesome, thanks a lot mate, this was starting to drive me crazy, because the tips in this video did not fix my problem, your line saved me.

  • @user-og6hl6lv7p
    @user-og6hl6lv7p 4 года назад +4

    You could also try extending the collider bounds in the direction of the player/objects velocity to predict collisions for greater accuracy.

    • @styxrakash4639
      @styxrakash4639 2 года назад +1

      This is a really nifty tip man. You could even have it be extended at a greater distance given a greater velocity and such

    • @Deatheragenator
      @Deatheragenator Год назад +1

      But then you might have this weird floating bounty around.

  • @ThatNerdGuy0
    @ThatNerdGuy0 Год назад

    Thank you so much, I didn't know that it was gonna be this simple, I thought that I was going to have to do some raycast collision stuff!

  • @omegaomega6838
    @omegaomega6838 2 года назад +1

    Seriously thank you so much. This was exactly what I needed to fix my problem. I really appreciate this video you've made for us. Thank you very much.

  • @molacool
    @molacool 4 года назад

    No more headaches . Thanks !

  • @srijangupta3234
    @srijangupta3234 3 года назад +2

    But, I already have set it to continuous and that still happens. Plus, I tried all other options...
    Any idea how to fix it

    • @tekae6949
      @tekae6949 3 года назад +1

      Someone from unity technology said you should use rigibody to move the object.
      when i used transform to move the object It wasn't working for me, but it looks fine with rb.addforce

    • @srijangupta3234
      @srijangupta3234 3 года назад

      @@tekae6949 Thanks,
      I'll look into it..

    • @DARK_AMBIGUOUS
      @DARK_AMBIGUOUS 3 года назад +1

      @@srijangupta3234 I finally found a solution after about a year of objects going through walls in my game, it turns out that I made everything in my game WAY to big. Apparently in unity the default 1x1x1 cube is supposed to be 1 cubic meter in size and everything in your game should be realistically sized, I had a problem where the gravity in my game was to low because I made everything way to big, and once I shrunk everything, it increased my games FPS and performance by a lot. The bigger everything in your game, the faster stuff moves which means the easier it is to go through stuff, setting rigidbodys from discrete to continuous dynamic does not make it impossible for stuff to go through other things, it just makes it a lot harder to the point where it appears like it’s impossible, but ridiculously fast things can still go through continuous dynamic rigidbodys, and when everything in your game is way to big, stuff moves a lot faster. Once I started realistically sizing everything in my game, I stopped having collision issues and it also fixed low gravity and performance issues I’ve been having and a lot of people don’t know about this. It took me about a year to find a solution to this problem

    • @srijangupta3234
      @srijangupta3234 3 года назад

      @@DARK_AMBIGUOUS thanks mate...
      Even though it's been 4 months but this helped..

    • @mosh6303
      @mosh6303 2 года назад

      Thanks fren !! You make my day

  • @BoomcoreIsLive
    @BoomcoreIsLive 4 года назад +1

    I'm new to game development and i was unable to fix this issue in block breaker game when the ball hits the paddle very fast... I learned a new thing, Thanks! 😃

  • @fred841
    @fred841 3 года назад +1

    Im super new to Unity and this fixed my whole game (lol). Thank you very much. Good video

  • @vgstudio3588
    @vgstudio3588 Год назад

    You forgot to note that this does take up more resources so only use this only if this is completely necessary (like if this is essential to the gameplay). Overall, great video and something that I find useful.

  • @chawrx3
    @chawrx3 2 года назад

    simple, explanatory, and quick tysm

  • @KadaXuanwu
    @KadaXuanwu Год назад

    This just helped me fix my problem. But then I realized I have already given this video a like ... I really need to fix my brain and not forget everything ^^

  • @piztech5168
    @piztech5168 3 года назад +1

    Glad this exists, Thank you very much

  • @nanaomelodi2895
    @nanaomelodi2895 3 года назад

    3 month in this problem, and this F*** awesome video save my project!!

  • @BlueDotFamiliar
    @BlueDotFamiliar 4 года назад +5

    it seems like the object is still going through the walls with the continuous detection, though with very little struggle.

    • @DARK_AMBIGUOUS
      @DARK_AMBIGUOUS 3 года назад +1

      Have you figured it out yet?

    • @faiz7180
      @faiz7180 3 года назад

      Any solution?

    • @DARK_AMBIGUOUS
      @DARK_AMBIGUOUS 3 года назад +3

      I finally found a solution after about a year of objects going through walls in my game, it turns out that I made everything in my game WAY to big. Apparently in unity the default 1x1x1 cube is supposed to be 1 cubic meter in size and everything in your game should be realistically sized, I had a problem where the gravity in my game was to low because I made everything way to big, and once I shrunk everything, it increased my games FPS and performance by a lot. The bigger everything in your game, the faster stuff moves which means the easier it is to go through stuff, setting rigidbodys from discrete to continuous dynamic does not make it impossible for stuff to go through other things, it just makes it a lot harder to the point where it appears like it’s impossible, but ridiculously fast things can still go through continuous dynamic rigidbodys, and when everything in your game is way to big, stuff moves a lot faster. Once I started realistically sizing everything in my game, I stopped having collision issues and it also fixed low gravity and performance issues I’ve been having and a lot of people don’t know about this. It took me about a year to find a solution to this problem

    • @D4rkks
      @D4rkks 2 года назад +2

      @@DARK_AMBIGUOUS thats not the reason. i got realistic proportions and objects still go through things

    • @LedVon_Heavy
      @LedVon_Heavy Год назад

      @@DARK_AMBIGUOUS nice, thanks for that

  • @AsasinoManik
    @AsasinoManik 2 года назад

    Now I am finally seeing the solution of the most annoying problem I faced in unity when I am now switched to unreal engine haha.

  • @TREXYT
    @TREXYT Год назад +1

    this still didn't fixed my issue, where my player have tons of mass to eat (around 100 but it eat only some, i have to come back a second time on the mass then it eat the rest, and sometimes my player eat all at once soo i don't understand why), any help is appreciated

  • @Mot0Mot0
    @Mot0Mot0 2 года назад

    I actually love you for this

  • @alextreme98
    @alextreme98 Год назад +1

    Sadly, I still have the issue. I am using unity's terrain, fast moving objects still tunnel through it. Does anyone have a solution to that? Thanks for this tutorial also, it is really good

  • @harrison298
    @harrison298 3 года назад +4

    Unfortunately this setup does not work for the arrows in my game. The issue being that in one frame, the arrow is on one side of the enemy, then in the next frame, the arrow is on the opposite side of the enemy. So there are no frames where the 2 objects collide. This only happens when you're at very specific distances from the enemies.
    I would wager that if you moved the cube backward in this video's example by half a cube width, it would go right through the rigidbody wall.

    • @arthurlu7610
      @arthurlu7610 Год назад

      Tem a diferença entre a movimentação do objeto em si e dá movimentação por teleporte, algo do tipo Transform e Translate

  • @adouson
    @adouson 10 месяцев назад

    Thank you very much! The tutorial was simple and very easy to understand.

  • @VivianGameCollections
    @VivianGameCollections 2 года назад

    OMG I NEVER THOUGH I CANT BE SOLVE SO EASILY, THANKS A LOT

  • @learngenius918
    @learngenius918 7 месяцев назад

    I knew I would learn sth from RUclips. Thank u so much.

  • @afreensiddqui2022
    @afreensiddqui2022 3 года назад +1

    when player is move and wall is rotate along with y axis so player have to be stop.
    Can you tell me how rigidbodies function will have to be set ?? for both player and wall....

    • @DARK_AMBIGUOUS
      @DARK_AMBIGUOUS 3 года назад

      What? I may be able to help but I don’t understand, please retype it better. I think the answer is both should be set to Continuous Dynamic if they are both moving, but if you are saying that when your player walks into a wall on an angle, they spin on the Y axis, I had this problem and you have to change the 2 drag options up, the first one is for how much friction the rigidbodys has and the other is for how much friction when it’s rotating, change the rotating one up a lot and it should stop doing that. And if you stop falling when jumping or falling into a wall, the solution to that is that you have to right click in the assets area and got to “create” and then go to Physic Material, then set the friction of the material to 0, then go to the object that you are getting stuck on (or every wall in your game) and set the material to the new physic material you just created

  • @warkarma
    @warkarma 4 года назад +1

    Thank you! This helped a ton!

  • @IlaiShoshani
    @IlaiShoshani 2 года назад +1

    Wow ty this was super helpful!

  • @rickedysplit2458
    @rickedysplit2458 2 года назад

    Thank You, very simple and works perfectly.

  • @jalalvids
    @jalalvids 2 года назад

    It's not working when the terrain has mountains . If the body collides with them, it penetrates the mountain and fall

    • @alextreme98
      @alextreme98 Год назад

      Hi. Have you found a fix when this is happening on terrain?

  • @AlienFt
    @AlienFt 2 месяца назад

    If someone still has issues with collisions going through in a weird way, check the movement code, if u directly set the Rigidbody position via MovePosition there will be issues, rb.velocity makes so walls etc becomes brickwalls, unpassable :)

  • @vibaj16
    @vibaj16 3 года назад +1

    How much does this impact performance?

    • @DARK_AMBIGUOUS
      @DARK_AMBIGUOUS 3 года назад

      It depends on your computers specs, it shouldn’t be that much, you’ll have to try it out and see

  • @Bigmancracked
    @Bigmancracked 27 дней назад

    I had an issue where an obstacle went through the player, they collided slightly but i wanted the player to get bumped away by the obstacle or carried along by the obstacle but all that happened was the obstacle would touch the player, alter its direction a little bit then just go through the whole player. to fix it I went to edit >project settings >Physics >Default max depenetration velocity - set to a very high number (10000000) and i have no clue how it works but it did for me

  • @meystudios2658
    @meystudios2658 4 года назад +1

    in Unity 2D, rigidbody 2D hasn't got Continuous Dynamic.I need this.
    Because very fast moving objects pass through each other. How can i fix it?

    • @Arganoid
      @Arganoid 3 года назад +2

      Maybe a shorter fixed update timestep? But that will have performance implications if you have a lot of objects

  • @randyhuynh776
    @randyhuynh776 Год назад

    Thanks so much. I was having trouble getting my moving players to detect fast moving bullets.

  • @supertunes9860
    @supertunes9860 4 года назад +1

    thank you for best example

  • @micearn1
    @micearn1 2 года назад

    Thank you so much, sir. This was really helpful

  • @svengangert2683
    @svengangert2683 3 года назад +1

    Hi! I'n my case it's a similar scenario, except the wall also moves towards the other objcet at the same time (in my case a ball with a sphere collider). I lready changed all the options, (continuous/dynamic continuous) and so on, but the moving the colliding ball still goes throuth the moving wall. Is there anything I can do to prevent that from happening?

    • @DARK_AMBIGUOUS
      @DARK_AMBIGUOUS 3 года назад +1

      I had this same problem where changing it to Continuous Dynamic would only make it a little bit harder for objects to go through walls but everything would still go through walls if moving fast enough and I think after about a year I have found the solution. It turns out that whenever I made a game, everything in my game was waaaay to big, like I made a labyrinth game and the ball kept falling through the ground when tilting it. Then I found out that in unity, the default 1x1x1 cube is 1 cubic meter in size, and everything should be realistically sized. The way collisions work is that the game constantly asks colliders if something is colliding with them. When rigidbodys are set to “discrete”, the game asks less often, I’m not sure but let’s say 20 times a second or once every 1.5 frames, and when it’s set to continuous dynamic, it asks 60 times a second, and when something is moving extreamly fast, like ridiculously fast where you can’t see it moving, it will pass through the collider before it has time to update, so if you make everything in your game way to big, then stuff will be moving a lot faster, and will be able to go through walls easier, I used to make everything in my games way to big and I had problems with low FPS, objects would fall slow like there was no gravity, and stuff would go through other stuff, so you might have to shrink everything in your game to a realistic real life size and that will increase the gravity strength of your game but you can always change the gravity of your game in the settings or create your own gravity. And you can use a default cube as reference because they are 1 meter tall. I started doing this to all of my games now and I no longer have this issue at all. It took me about a year to finally figure this out

  • @cheesebucketman1606
    @cheesebucketman1606 2 года назад

    strang question can i see the ad force script

  • @shugabrush3671
    @shugabrush3671 3 года назад

    Thank you! This was easy for me to fix!

  • @JezCane
    @JezCane 2 года назад

    Thanks, I was doing all sorts of things to try and fix this...

  • @Xenoks_Dev
    @Xenoks_Dev 5 месяцев назад

    thank you, very useful

  • @firstsecond4413
    @firstsecond4413 3 года назад

    how about Mesh Collider? When ball with sphere collider and rigidbody still go through objects with MeshCollider

  • @theonlyreega
    @theonlyreega 4 года назад

    Is there a reason why my Unity project won't let me change the Collision Detection mode to continuous dynamic? Every time I try to set the obstacle Collision Detection to continuous dynamic it automatically sets it to continuous speculative

    • @M-Cube_
      @M-Cube_ 4 года назад

      You probably have "Is Kinematic" checked. As the Unity documentation states: "Continuous speculative: [...] This is also the only CCD mode that you can set kinematic bodies. [...]".

    • @theonlyreega
      @theonlyreega 4 года назад

      @@M-Cube_ yeah i figured yt was that at the time of commenting. But even after the video suggestion the collision was inconsistent. I had to increase the size of the box collider

    • @DARK_AMBIGUOUS
      @DARK_AMBIGUOUS 3 года назад +1

      @@theonlyreega I finally found a solution after about a year of objects going through walls in my game, it turns out that I made everything in my game WAY to big. Apparently in unity the default 1x1x1 cube is supposed to be 1 cubic meter in size and everything in your game should be realistically sized, I had a problem where the gravity in my game was to low because I made everything way to big, and once I shrunk everything, it increased my games FPS and performance by a lot. The bigger everything in your game, the faster stuff moves which means the easier it is to go through stuff, setting rigidbodys from discrete to continuous dynamic does not make it impossible for stuff to go through other things, it just makes it a lot harder to the point where it appears like it’s impossible, but ridiculously fast things can still go through continuous dynamic rigidbodys, and when everything in your game is way to big, stuff moves a lot faster. Once I started realistically sizing everything in my game, I stopped having collision issues and it also fixed low gravity and performance issues I’ve been having and a lot of people don’t know about this. It took me about a year to find a solution to this problem

  • @trungnghia-reallabnghia3919
    @trungnghia-reallabnghia3919 2 года назад

    this is useful. thank you so much!

  • @vitaly768
    @vitaly768 3 года назад

    You helped me a lot! Thank you! :)

  • @anubislubieplacki1995
    @anubislubieplacki1995 2 года назад

    thank you i was looking for somethink like that

  • @beowulfkaine
    @beowulfkaine 3 года назад

    Thank you this really helped me

  • @SMABSYSTEMS
    @SMABSYSTEMS 2 года назад

    Thanks a lot bro ❤️

  • @jacobzak7494
    @jacobzak7494 Год назад

    Wow thanks!!! Love you more than chaGPT!

  • @tryan0
    @tryan0 2 года назад

    Bullets are still clipping through other players, despite me following all directions in this video (the bullet is even travelling at a slower speed than the cube shown). What more should I do?

    • @OnlineCodeCoaching
      @OnlineCodeCoaching  2 года назад +1

      Might be something with the other players, like maybe they are using character controllers instead of rigidbody. Or if they have both character controller and rigidbody conflict. Never use both. Try checking the collision detecting refresh rate.

    • @OnlineCodeCoaching
      @OnlineCodeCoaching  2 года назад

      docs.unity3d.com/Manual/ContinuousCollisionDetection.html

    • @OnlineCodeCoaching
      @OnlineCodeCoaching  2 года назад

      If all fails, use ontriggerenter instead. It has a much faster and reliable detection.

    • @tryan0
      @tryan0 2 года назад

      @@OnlineCodeCoaching Hello,
      I happen to be using OnTriggerEnter on the bullets, rigidbodies on the players with the same colliders and continuous collision detection. Maybe it's the scale of the bullets? But I don't want to make them too large. Thanks though.

  • @Manceer
    @Manceer 10 месяцев назад

    Thanks!

  • @ErtBaran
    @ErtBaran 4 года назад

    Thank you so much dude. Thank you.

  • @blakeb7490
    @blakeb7490 Год назад

    Wow thanks. This helped.

  • @imobitoboy
    @imobitoboy 3 года назад

    Thanks A Lot You Are Seriously life saver

  • @DanielRodriguez-sf4vj
    @DanielRodriguez-sf4vj 3 года назад

    Thanks! much helpful. very clear. such simple. wow

  • @sanjaysatishkrishna9480
    @sanjaysatishkrishna9480 2 года назад

    even after using this solution, it is not getting fixed for me. pls help (im replicating, rocket league so my car tries to hit the ball but it passes through the ball . ive not set the collider as a trigger and changed collision detection too but the problem still exists.)

  • @AlexRonai
    @AlexRonai 2 года назад

    I have a problem, I am developping a 2D top down game in which I have a bomb. If the GameObject is between the bomb and a wall from a tilemap (which has Tilemap Collider 2D, Rigidbody 2D (static body type) and a Composite Collider 2D) and that the bomb explodes, the slime will go through the wall even if its collision detection is in continuous. I tried to make the rigidbody2d of the wall to kinematic and collision detection to continuous but it didn't change anything. It's a big problem as to go to the next room, the player must kill all enemies....

  • @temonationplayz2378
    @temonationplayz2378 2 года назад

    you're a lifesaver man

  • @nicolasluiz257
    @nicolasluiz257 3 года назад

    Thank you very much.

  • @austral4384
    @austral4384 4 года назад +1

    how to do this in 2d

  • @AZASeraph
    @AZASeraph 3 года назад

    I have the problem that my bullets bounce off walls

    • @DARK_AMBIGUOUS
      @DARK_AMBIGUOUS 2 года назад

      Go to assets the assets area and right click, go to create > Physic Material, then set bounciness to 0, then go to the collider of your bullet and go to “Material” for that collider and set the material to the new Physic Material you just made, also if that doesn’t work, you may also have to add the Physic Material to your walls. Also if your having a problem where you stick to walls when jumping into them instead of falling, you have to do this but turn the friction to 0 on your physic material

    • @AZASeraph
      @AZASeraph 2 года назад

      @@DARK_AMBIGUOUS I had to make a script were if it collides with anything then it deletes the bullet and that's worked

  • @giorgigazashvili8294
    @giorgigazashvili8294 2 года назад

    broooo are u joking how is it that simple wow thanks man

  • @kimgyulgamgyul
    @kimgyulgamgyul 2 года назад

    Best and clear

  • @teppichbodenverleger1214
    @teppichbodenverleger1214 3 года назад

    Nice!!!!! Thank you so much!!!!

  • @aero7982
    @aero7982 4 года назад

    Same problem but on trigger enter delay due to too fast bullet

    • @DARK_AMBIGUOUS
      @DARK_AMBIGUOUS 3 года назад

      Are you still having this problem? If you are, then I have a solution

    • @aero7982
      @aero7982 3 года назад

      No

  • @ZangJM
    @ZangJM Год назад

    Thanks a lot!

  • @averydee5328
    @averydee5328 2 года назад

    Thank you!

  • @LucasRoms
    @LucasRoms 3 года назад

    THANK U SO MUCH!

  • @mani_mincraft
    @mani_mincraft 2 года назад

    thank you so much!!!

  • @sivaramkumarchandra_to4849
    @sivaramkumarchandra_to4849 3 месяца назад

    thank you so much

  • @kingdomsteve
    @kingdomsteve 3 года назад

    This didn't work with my Rigidbody.MovePosition type player controller.

    • @DARK_AMBIGUOUS
      @DARK_AMBIGUOUS 3 года назад +1

      I finally found a solution after about a year of objects going through walls in my game, it turns out that I made everything in my game WAY to big. Apparently in unity the default 1x1x1 cube is supposed to be 1 cubic meter in size and everything in your game should be realistically sized, I had a problem where the gravity in my game was to low because I made everything way to big, and once I shrunk everything, it increased my games FPS and performance by a lot. The bigger everything in your game, the faster stuff moves which means the easier it is to go through stuff, setting rigidbodys from discrete to continuous dynamic does not make it impossible for stuff to go through other things, it just makes it a lot harder to the point where it appears like it’s impossible, but ridiculously fast things can still go through continuous dynamic rigidbodys, and when everything in your game is way to big, stuff moves a lot faster. Once I started realistically sizing everything in my game, I stopped having collision issues and it also fixed low gravity and performance issues I’ve been having and a lot of people don’t know about this. It took me about a year to find a solution to this problem

  • @halfbakedproductions7887
    @halfbakedproductions7887 Год назад

    Very common bug which trips up a lot of people.

  • @masterkonni0594
    @masterkonni0594 4 года назад +1

    Awesome vid dude

  • @usmanirfan8707
    @usmanirfan8707 2 года назад

    But my issue is still there

  • @UnityGameDev
    @UnityGameDev 3 года назад

    thanks for this video

  • @explosivekeeper
    @explosivekeeper 3 года назад

    Thank you

  • @HausCoding
    @HausCoding 3 года назад

    Thanks dude

  • @jaketadam
    @jaketadam 2 года назад

    best tutorial

  • @yarenheda
    @yarenheda 10 месяцев назад

    Thank you!!!!!!!!!!!!!!!!

  • @JAKEAVALON-rg8xm
    @JAKEAVALON-rg8xm 7 месяцев назад

    This is how Quantum work

  • @unityworks2963
    @unityworks2963 Год назад

    Thankx

  • @goatfishplays
    @goatfishplays 3 года назад

    ty so much

  • @_Kater_
    @_Kater_ Год назад

    It's not working

  • @qdnr
    @qdnr 3 года назад

    Thx

  • @meetkachhadiya5826
    @meetkachhadiya5826 3 года назад

    work is good but object speed automatically decrease

    • @DARK_AMBIGUOUS
      @DARK_AMBIGUOUS 3 года назад

      If you want to make something bounce off the wall without losing speed, you can go to the assets are of unity, right click and go to create > physic material, then you can set the friction to lower or you can add bounciness, then name the physic material something. Then go to the wall and go down to the collider and set the material to whatever the physic material you just made, you can also change the friction to zero and use it in a FPS or open word game if you player keeps getting stuck when jumping or falling into walls

  • @obajzob221
    @obajzob221 Год назад

    helpfull :3 thanks bother! xD

  • @alex_6392
    @alex_6392 3 года назад

    THHXXX

  • @hilbertsla1986
    @hilbertsla1986 2 года назад

    ty

  • @GWGS_YT
    @GWGS_YT День назад

    good

  • @RobinGoodwe872
    @RobinGoodwe872 3 года назад

    Cool

  • @humanwelcomemat9532
    @humanwelcomemat9532 2 года назад

    TYSM OMG