Follow Mouse



  • So I'm trying to build a minimal rts tower defense hybrid using the MinimalTD example code and thought it'd be fun to have the screen follow the mouse with this:

    FlxG.camera.follow(mouseCon, FlxCamera.STYLE_TOPDOWN_TIGHT);

    For the record, I am still using 3.5 for reasons.

    And, well, I INSTANTLY got ill due to vertigo, heh. So. You can't control the user at all. But you can control the camera.

    What would you do to slow the camera down to prevent vertigo?

    I'm not sure what camera values to edit.



  • Can't remember the exact name for the 3.5 version, I think it was lerp, but anywho, the last param of your follow() let's you specify the smothness of your camera. Is on by default, so you might wanna tweak down that value. This is all assuming, of course, that you experience motion sickness because of the camera lag.



  • Thanks! That helped!


Log in to reply