- Home /
minimap question
It is possible to play two animations with the same key? I have a minimap and two animations. One animations gives a "stylish zoom" to the minimap, and the other make it go back to the normal position, but i want to make a single keyboard key to play those two animations.
Example: The player press "M", the map zoom in. The player press "M" again, and the map zoom out. It is simple, but i sincerely don't know how to do this. Is it possible? Do i need to use a animator to do this? Because i don't like to use animator components.
Answer by DroidifyDevs · Jun 23, 2016 at 09:51 PM
That's so, so basic. You can simply use a bool to know if you are zoomed in or not, for example:
//use DetectZoom() when pressing a key
public bool IsMapZoomed;
void DetectZoom()
{
if (IsMapZoomed == true)
{
//zoom out map
}
else
{
//zoom in map
}
}
Yep, i know how to make real helicopter physics and to make it fly properly with two main rotors, colliding when necessary and entering in first person camera, but i dont know how to make this lol
Your answer
Follow this Question
Related Questions
Camera only panning on 1 axis 1 Answer
How to make zoom in and zoom out with a slider on minimap? 1 Answer
minimap zooming c# 1 Answer