Search Unity

Question Particles colliding with submarine

Discussion in 'Physics' started by R_Smith, May 4, 2023.

  1. R_Smith

    R_Smith

    Joined:
    Aug 20, 2022
    Posts:
    1
    Hello -

    Camera is fixed behind submarine prefab (rigidbody applied) and lots of big particles floating in the water/space. When submarine collides with the particle ball, it just jumps out of the way but does not get propelled away as if force applied, which is what I would like to have happen. I'd like to have the sub gliding through the water and small particles all around and they move fluidly out of the way when collision.

    Zero gravity environment. Particles are suspended with start speed of 0.01

    Bounciness has been played with, mass of submarine tweaked, feel like this shouldn't have to be a scripted thing, but I'm fairly new to this so perhaps. AddForce?

    Appreciate any and all feedback,
    thanks, Matt
     

    Attached Files:

  2. tjmaul

    tjmaul

    Joined:
    Aug 29, 2018
    Posts:
    467
    You’re probably moving the submarine using transform.position

    if so, try using its rigidbody.MovePosition and MoveRotation methods. If not, we’ll have to take a closer look :)