- Home /
How do i make my character colide with an object to then have a pop up box with choices appear when the character colides with the object?
How do i make my character colide with an object to then have a pop up box with choices appear when the character colides with the object?
Answer by Favouriteless · Nov 06, 2019 at 01:38 PM
I will not give you the code as that would be pointless but here are some pointers:
Use OnCollisionEnter to detect collisions, you can do any logic about about the collision in there too.
The popup box can go in your UI script and be called with Popup(object) or whatever, it can call object.method for each option for interacting with the object.
Try to keep the popup box aligned to the object. You can use Camera.WorldToScreenPoint to find that.
Hopefully these will be of some help.
Your answer
Follow this Question
Related Questions
Reset other animations on screen 0 Answers
Can't see each other in multiplayer 2 Answers
Get center direction Vector3 between two other direction Vectors 1 Answer
Calling variables from other scripts 2 Answers
Access other script from Editor script 2 Answers