- Home /
Question by
UseDreams · Mar 07, 2021 at 04:49 PM ·
3dsounddestroy objectfps controllerpress
how to make the character look at the object and when clicked on mouse0 the object is removed with sound?(3D)
how to make the character look at the object and when clicked on mouse0 the object is removed with sound?(3D)
a certain object must be removed
Comment
Answer by Invopicker · Mar 08, 2021 at 10:04 PM
Hi! Unity has method Transform.LookAt, use it in order to move your character to an object. But it will rotate you character instantly. If you want to rotate it with time you have to calculate an angle with Mathf.Atan2. For deleting object I would create a separate class, for example ObjectDeleterController and cast form them a ray and delete objects with specific tag.
Your answer
Follow this Question
Related Questions
Play sound on button press? 1 Answer
Physic Based FPS Movement,Fps Movement Physic Based 0 Answers
Set audio clip to 3D in script 1 Answer