Hey! I'm using draggables and the return pickups script from the AC wiki so I can inspect items, rotate them and discover stickers with numbers on them as a part of a larger puzzle. It works amazingly well but I would love to be able for the character to play dialogue once the sticker is visible, basically saying something like "Okay this one has number 5" when the sticker is visible... Is it possible to place some marker/hotspot that's either visibility-related or rotation-related that will trigger when in view without clicking? Because I'm holding the left click for the entire duration of the rotation... Thank you for any ideas!
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Okay so I ended up creating a trigger that's a child of the object and is sticking out in one direction so when you rotate it, it touches the player and triggers. Would still appreciate a more elegant solution if it exists though!
That's a smart solution! It's possible to use a script-based approach instead, but your way makes it visually clear from a design / debug view.
For the script approach, you could try attaching a Hotspot with a Use interaction, and then running that automatically when the dot product of its relative position compared with that of the camera reaches some threshold value. Something like:
Thank you so much, Chris! I'll test it out when I get home.
Hmm, it doesn't seem to work. I can't select anything for the Moveable_PickUp for some reason.
NullReferenceException: Object reference not set to an instance of an object
AutoUseHotspot.Update () (at Assets/XXX/AutoUseHotspot.cs:15)
Tried to change it to GameObject in the code so I can select the object but that's probably not enough.
Have you assigned all the fields in its Inspector?