How to find camera speed

Hello, im making a 2d side scroller, and i need the background speed to depend on the speed of the camera, how do i make it, i tried a lot of method, but it all of them useless and return to me x:0 y: z:0 speed

What about?

324452-screenshot-2.jpg

Yeah, cameras don’t use “physics” velocity (running through PhysX or Chaos). They just use the basic movement velocity, which should be obtained through this. Alternatively, you could cache the location each frame and compare to the previously cached variable to calculate the amount the camera has moved.

Thanks Philbax, i solve problem by this tip “you could cache the location each frame and compare to the previously cached variable to calculate the amount the camera has moved”