Is there a way to say interact with a barrel--it could be another object not just a barrel but a barrel is a good example---when you get the interact icon which could be a glove or hand --you would seem to pick it up so it's in front of the camera at eye level and then you could drop it in another part of the scene and it will stay in that position?

Post edited by Catacomber on
  • Uhm... let's see... Is your prototype first person? Do you usually show the hand of the player with the object is he carrying, like sword, rod etc...? If it is that the case, could you change the carrying object like a weapon? I mean:
    - You are in front of the barrel
    - You click to get it
    - The barrel disappear like a collectable
    - The hand of your player shows the barrel on it (maybe using a global variable, like: mountingBarrel yes/no and change accordingly the prefab)
    - you move to desired location, and when you wanna release it, you store the coordinates of where the player is
    - you create a new instance of the object at player position + 1z (something like 0,0,1) to place the barrel in front of him
    - you change object variable to store new coords (this must be a bit of work, dunno a instant possible solution)
    - when you log out, as new coords are stored, the barrel keep this new position.
    I hope this workflow helps you to find a solution. :)
  • Use the Event System ~ :)
    There's a step to mount/unmount objects in the Function Steps.

    E.g. using it in a global event to drop it again - you'll probably need a game variable (e.g. bool) to remember if you're currently have something picked up, and start the event on input key with the bool variable as condition. Finding the mounted object could be tricky, but could be done e.g. using a tag or special name for the object.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thanks so much to both of you!
Sign In or Register to comment.