Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Camera Shake  (Read 1869 times)

0 Members and 1 Guest are viewing this topic.

Spark Dev

  • Newbie
  • *
  • Posts: 2
    • View Profile
Camera Shake
« on: February 17, 2021, 05:16:30 am »
Hey Programmers!, I'm working on a game using SFML & C++. This is my first experience with SFML. I wonder how could I add camera shake effect to my application. Anyone got any idea about that?

fallahn

  • Sr. Member
  • ****
  • Posts: 492
  • Buns.
    • View Profile
    • Trederia
Re: Camera Shake
« Reply #1 on: February 17, 2021, 10:52:10 am »
Take a look at views: https://www.sfml-dev.org/tutorials/2.5/graphics-view.php these are basically your in-game camera. Adding some movement to the position will create something akin to camera shake.

Spark Dev

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Camera Shake
« Reply #2 on: February 21, 2021, 03:06:19 am »
Thanks for your answer. It helps me a lot.