How to rotate and hydrant
![gand](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
![](https://img.youtube.com/vi/NUGjQY0lXDk/0.jpg)
Following this TSB tutorial about to rotate a cannon with min and max, I try to apply it to an hydrant that rotate (with min and max) only when is pressed inside.
I use Rotate to Angle behavior with this expression:
`max(-90,min(0,vectorToAngle( game.Mouse.Position.X - self.Position.X , game.Mouse.Position.Y - self.Position.Y )))`
But it works only the first time I click on it; when I click the second or next time hydrant has strange movements and slide away from when is pressed also going over min and max position.
I published Hydrant rotate test http://gamesalad.com/game/20932 to try it.
Thanks for your help.