Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Fit Objects Script

Discussion in 'Scripting' started by alexbyruiz, Mar 21, 2019.

  1. alexbyruiz

    alexbyruiz

    Joined:
    Mar 21, 2019
    Posts:
    3
    Hi, I'm doing a video game about the assembly of a pc's components. I have made movement and rotation scripts, but I need a script to fit each object in its respective port. Once all the objects are fitted, finish the game. Some help ?
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,476
    Basic system could be using Triggers (if you are using physics already) ?
    So, if object is moved into the trigger, it checks if its correct type, if yes, it snaps in..
    and your pc manager script gets True set for that part.. and after all parts are True, done..

    if that doesnt help, can you post your script or info about how you are moving them,
    how it should fit the port and so on..