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

problem with collision of objects

Discussion in 'Scripting' started by Trild123787898, Jan 31, 2020.

  1. Trild123787898

    Trild123787898

    Joined:
    Dec 9, 2018
    Posts:
    206
    how can I make it so that in case of a collision even if it’s a great speed didn’t pass through, do not repel, or did not bounce from each other, is it possible to do this ??? enable isKinematic is not suitable!
     
  2. Yoreki

    Yoreki

    Joined:
    Apr 10, 2019
    Posts:
    2,605
    Objects should not pass through each other if you put both their collision detections on mode continuous instead of discreet. As for not bouncing off other objects, what exactly is the behavior you want to achieve? If two cubes collide with each other on a flat surface, i imagine you want them to just "stick together"? What if one of the cubes is rotated such that it hits the other one with an edge instead of a flat surface?
    Depending on the desired behavior you may be able to just set the velocity to 0 and/or parent the objects together so they move in the same reference frame. There are also some things you can adjust using physics materials, so maybe you just want to use materials that have no bounciness.
    If you want physically unnormal behavior then you'll probably have to implement it yourself tho.
     
  3. Trild123787898

    Trild123787898

    Joined:
    Dec 9, 2018
    Posts:
    206
    thanks, why should i start?