Military Guy Posted June 11, 2022 Posted June 11, 2022 How to make a camera Shake if vehicle speed 300+ km/h? Как сделать тряску камеры если скорость машины свыше 300 км.ч?
Discord Moderators Tut Posted June 11, 2022 Discord Moderators Posted June 11, 2022 As you are asking a scripting related question, I have gone ahead and moved this into the Scripting section. Good luck
Hydra Posted June 13, 2022 Posted June 13, 2022 (edited) Client: local MIN_VALUE = 0 local MAX_VALUE = 15 function RenderShakeEffect() local vehicle = getPedOccupiedVehicle(localPlayer) if vehicle then local vx, vy, vz = getElementVelocity(vehicle) local actualspeed = (vx^2 + vy^2 + vz^2)^(0.5) local kmh = actualspeed * 180 if kmh >= 300 then setCameraShakeLevel(math.random(MIN_VALUE,MAX_VALUE)) else setCameraShakeLevel(0) end end end addEventHandler("onClientRender", root, RenderShakeEffect) Edited June 13, 2022 by Hydra
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now