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

Beginner's Questions regarding the alteration of prefabs

Discussion in 'Prefabs' started by CenturyofSalt, Apr 20, 2019.

  1. CenturyofSalt

    CenturyofSalt

    Joined:
    Apr 19, 2019
    Posts:
    3
    Hello,

    So, I'd like to start by saying that I am incredibly new to Unity, but I really enjoy it so far! I've only been using it for a few days now, but I can already see how I've improved on some minor things. I don't expect to become a master after a few days or weeks, but I'd certainly like to get better each day. It's a hard task, but I think I'm up for it.

    The issue I am encountering is that for every single action or concept there are hundreds/thousands of ways to approach it. While that's the one of the things I enjoy about Unity, it is also daunting for someone as new as I am. I also have no real-world coding experience, so the scripting is difficult. It's kind of my favorite part, though, so I'd like to slowly chip away at the skills I need to successfully build the game I want.

    Now, the root of my current problem, the one that has brought me to the forums in the first place: doors. Oooooh, doors, you illusive mistresses. I have tried soooo many methods to get you to work, but I simply cannot figure it out! Ideally, I want to animate all doors (cabinets, room doors, fridge doors, etc.) to open with the press of a key, rather than by proximity. I finally figured out how to use hinge joints, but the animation process makes little sense to me. I understand that I have to record the animation and then apply it, but that's about as far as I can get.

    My request to anyone who cares enough to assist me is this: How can I make my player open a door, and not just a specific door, but lots of different kinds of doors? I am 100% willing to start from scratch and throw everything I think I know about it out the window if someone is willing to explain the steps I need to take in order to make my doors work. I implemented some furniture from the asset pack that I have linked here:

    https://assetstore.unity.com/packag...stic-furniture-and-interior-props-pack-120379

    I really like these assets and they are wonderful until I can find someone to team up with who knows how to make models specifically for the game I'm building. But until that time comes (if it ever comes to that) I would love to know how to take one of the models from that pack and make the doors functional. I looked all over the place for a good method on how to do it, but I am having a really hard time translating it to my own game.

    Upon request, I will even provide the entirety of my player script, so that you know what I'm currently working with.

    Thank you, in advance, to any kind soul who takes time out of their day to help me with this headache. I really just want to get over this hurdle, so I can move on to the next one.