Midpoint Camera Between Player and Cursor Example

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hey Guys!
    I'm here with another example file that I made for my game that I thought could be useful for the community. Previously I used to always center the camera on the player, but that's no fun. I came up with a compromise that makes the game feel more interesting. The camera is placed at the midpoint between the player and their cursor. Therefore they can stretch out their view to look farther ahead in the game. There's a max distance restriction so the camera doesn't go too far. You can change the position of the camera too, so it's not in the center (line 4 change the 0.5 value. I prefer 0.25). The example comes with on-screen directions and values that you can test.

    You can test out the flash build here: Please login to see this link.

    -Sumo

  • Kudos to you for making me finally understand an implementation of an arctangent function!
    Your timing couldn't have been better, as I was searching for something like this to replace my obsolete midpoint system.

  • Thanks. I think I added the wrong link to test out the flash example. This should be the correct link: Please login to see this link.

    Custom A* Pathfinding in MMF2: Please login to see this link.
    Random Tile World Generation: Please login to see this link.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!