Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Internal Geometry Collision

Discussion in 'Physics' started by JBetts98, Dec 1, 2020.

  1. JBetts98

    JBetts98

    Joined:
    Nov 30, 2020
    Posts:
    1
    Hi,
    I am trying to simulate magnets in a 3D object with internal walls.
    The end goal would to have multiple of these objects (outer tile and cylindrical magnets shown in picture below) in a row and simulate a magnetic chain reaction.
    I have the code woking to get magnetic forces working but struggling with collision.
    The magnets have a capsule and box collider to simulate a cylinder collider.
    I have attempted to put a mesh collider on the outer tile object and this works well for the outer geometry but whenever magnets are placed inside the physics seems to freak out.
    Is there another way to do this?
    I am quite new to unity so any help would be great

    upload_2020-12-1_10-39-13.png