Search Unity

Vacuum effect

Discussion in 'General Discussion' started by denali95, Jun 23, 2021.

  1. denali95

    denali95

    Joined:
    Nov 6, 2016
    Posts:
    78
    Hi! I'm looking to create an effect similar to the bolts in Ratchet and Clank or the studs in the Lego games where the items are drawn towards the player like a vacuum. Ideally, I'd like to be able to add some fluid, dynamic direction to the sucking up motion so it gives a natural feel. Any thoughts on how to approach this?
     
  2. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,572
    The simlest way to do it is to use "overlap sphere" to find rigidbodies within attraction range and then apply attraction forces to them within FixedUpdate. That would create a "black hole" sort of effect.