- Home /
Absolutely insane rigidbody collisions [URGENT] (C#)
My rigidbody collisions are acting up, and I can't figure out why. More info, code, pics, and even a video are here:
https://drive.google.com/drive/folders/1BQp_4qqa0_P96joKgimMuwB9Pij_j_yd?usp=sharing
Urgent C#, Urgen...cy... Get it? LOL! Anyway, Try putting any physics translations inside of FixedUpdate ins$$anonymous$$d of Update. You should always do your physics related stuff inside of FixedUpdate.
Answer by Pinkuboxu · May 28, 2018 at 07:17 PM
Anything that handles a Rigidbody should go into a FixedUpdate() method and not Update(). Try just changing the FallScript.cs Update to FixedUpdate. The GravityController is fine.
Perhaps you can elaborate as to what you are trying to accomplish? You probably need separate scripts for the player and the block. In fact, I'm not sure you need the fall script on the block at all. If you are trying to make the player carry the block... then you should probably switch the block to kinematic when carry and off when not. Use the player's transform as an offset to the block. If I'm way off then forgive me for not knowing what the fudge it is you are doing, but it's pretty vague otherwise.
I'm not trying to make the player carry the block. He's not supposed to have it. What is happening is the colliders are overlapping. You can see this better with more falling blocks, and soon I will post a video of that.