Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Joint break force alternative with no Rigidbody?

Discussion in 'Physics' started by Eithman, Dec 9, 2019.

  1. Eithman

    Eithman

    Joined:
    Jun 8, 2017
    Posts:
    8
    I'm working on this game where these snake like creatures are instantiated and move around.(Here's a video of one
    ) The snake creatures right now are a series of cubes connected by joints. The way the snakes moves is by the cubes rotating based on random numbers chosen when they instantiate. The reason I need break force from the joints is because I would like them to be able to "fight" each other. So when they're randomly flailing around, them might smack into one another hard enough to break one apart.

    The huge problem with this is that since each snake has 5 cubes rotating and using physics, once I get past 15 snakes on screen the lag stops the game entirely and for what I am trying to do I need hundreds of snakes on screen at a time. The only workaround for this would be to not use physics. I was thinking I could just use transform.translate to move the snakes, transform.rotate to rotate the cubes and parenting to hold them together. But then they will just travel right through each other without Rigidbodies and I don't know how I would achieve a breakforce equivalent. Any suggestions?