I am currently writing a C# simulation of a boat with a number of speeds. With my rigidbody and colliders, it works just fine at low speeds, but once the boat goes to the higher speeds, it starts going straight through the other colliders.

I have tried:

  • changing the physics rules
  • editing the rigid body rules
  • and even using the DontGoThroughThings code

The new code has somewhat increased the speed the boat can collide at, but not enough for the simulation.

有帮助吗?

解决方案

It turns out I only needed to got to ProjectSettings -> Time -> Fixed TimeStep There you just need to raise the number by a little bit. Be careful though, if you raise the value too much it will freeze the program.

其他提示

I know it is an old question but, if you are using something to do with transform, then try using AddForce on your rigidbody, it works better with collisions. Here is a link to the docs, https://docs.unity3d.com/ScriptReference/Rigidbody.AddForce.html

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top