- Joined
- Mar 3, 2006
- Messages
- 1,564
I want to make a camera shake option so that when a player scrolls the camera to a certain location the camera will start shaking but I don't know how the function
GetCameraTargetPositionX
GetCameraTargetPositionY
works for multi-player. So far I made something like this:
JASS:
private function cameraShake takes real x,real y returns nothing
local real camx = GetCameraTargetPositionX()
local real camy = GetCameraTargetPositionY()
local real dx = x - camx
local real dy = y - camy
local real dist = SquareRoot( dx*dx + dy*dy )
if dist <= 500. then
// Start Shaking the camera
endif
endfunction