dop2000 that is great! (only looked at the second one)
so you are getting the angle and the extreme of the analog stick...dividing by the MaxDist and making that your clamp?
one issue I had my original as well is if the analog stick is extended in place and simultaneously the player travels in the opposite direction...the result is that the player goes off screen. On the flip side, when the player moves towards the direction of the analog stick, the player proceeds the camera.
to clamp the camera while the player is moving I've tried a few things. But I think it may have more to do with the lerp maybe?
I added this to the Set Position:
clamp(lerp(Self.X, (Player.X+d*cos(a)) , 2*dt), Self.X-100, Self.X+100)
clamp(lerp(Self.y, (Player.y+d*sin(a)) , 2*dt), Self.Y-100,Self.Y+100)
I made the lerp a little faster and so it won't go beyond 100 pixels in every direction, but that doesn't seem to be working either...