Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Question When using raycast and freezing rigidbodys "y" position, collider still apply on the raycast.hit.

Discussion in 'Physics' started by DevHadron, Dec 11, 2022.

  1. DevHadron


    Dec 3, 2022
    I am using raycast to move object on x ja z axis. I freezed rigidbodys y axis. After freezing y I noticed that the objects colliders still apply on the raycast.hit.point. I think the problem is that when freezing y axis of rigidbody the colliders still keep transforming its positions to raycasts hitpoint. Can anyone help me to get the colliders keep with the object even when y position of rigidbody is frozen? I froze the y axis of rigidbody to make the object not go through the raycast surface.

    The object hits the ball normally with its typical colliders.

    When position is freezed the object hits the ball from that far away...