Unity - Object too fast for Collision - FIXED

preview_player
Показать описание
This video will help you understand why fast objects go through other objects and how to fix this in Unity3D. Make your object never pass through other objects again.
Рекомендации по теме
Комментарии
Автор

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

markorossie
Автор

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

DARK_AMBIGUOUS
Автор

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

TREXYT
Автор

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

sabaa.vahidi
Автор

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

NathanTheCraziest
Автор

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
Автор

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!

ThatNerdGuy
Автор

Are You using transform.translate or Add Force

sameedulhussanasif
Автор

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.

GabeStott
Автор

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.

omegaomega
Автор

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

BrainSlugs
Автор

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?

svengangert
Автор

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 ^^

KadaXuanwu
Автор

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! 😃

BoomcoreIsLive
Автор

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

DARK_AMBIGUOUS
Автор

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

fred
Автор

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

Othello
Автор

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....

afreensiddqui
Автор

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.

harrison
Автор

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

nanaomelodi