Search Unity

Question Confused by Continuous vs Continuous Dynamic documentation discrepancy?

Discussion in 'Physics' started by codebiscuits, Nov 30, 2023.

  1. codebiscuits

    codebiscuits

    Joined:
    Jun 16, 2020
    Posts:
    91
    https://docs.unity3d.com/2021.3/Documentation/Manual/class-Rigidbody.html says:
    "Select Continuous if this Rigidbody is involved in fast-moving collisions with static colliders."
    ^^So my fast-moving car should be set to "Continuous" to detect collisions with static terrain
    "Select Continuous Dynamic if this Rigidbody is involved in fast-moving collisions with any colliders."
    ^^I guess if I shot a bullet at my car, both bullet and car would want Continuous Dynamic

    That makes sense to me so far.

    However:
    https://docs.unity3d.com/2023.3/Documentation/ScriptReference/Rigidbody-collisionDetectionMode.html says:
    "set [Rigidbody.collisionDetectionMode] to CollisionDetectionMode.ContinuousDynamic for fast moving objects, and for other objects which these need to collide with, set it to CollisionDetectionMode.Continuous"
    So according to this, my car, a fast moving object, should be set to ContinuousDynamic? And I guess if I was making Rocket League, the ball would be Continuous?

    Yant was saying:
    "I think the intended behaviour here was to compute continuous contacts with just static colliders in Continuous mode, and to compute continuous contacts with anything in the Continuous Dynamic mode.

    Example:

    1) If you want to hit a wall with a bullet -- use Continuous (typical case)
    2) if you want to hit another bullet with a bullet -- use Continuous Dynamic."

    But to me the documentation for Rigidbody-collisionDetectionMode is suggesting I should use Continuous Dynamic for example 1.
     
  2. zulo3d

    zulo3d

    Joined:
    Feb 18, 2023
    Posts:
    1,000
    Wording is a little confusing but it seems to be trying to state that to detect collisions between fast moving objects you should set the collision mode to Continuous Dynamic. And to detect collisions between fast moving objects and slow or stationary objects you should use Continuous.
     
    Last edited: Nov 30, 2023
    codebiscuits likes this.
  3. Arithmetica

    Arithmetica

    Joined:
    Feb 11, 2019
    Posts:
    43
    codebiscuits likes this.