Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would i make a distance based intensity for an explosion camera shake?

Asked by 1 year ago
Edited 1 year ago

So i'm trying to make like an explosion camera shake and i'm trying to invert the magnitude between the explosion and nearby players but i don't know how to do it? I'm kind of confused is this the way to do it or?

math.floor(math.abs(math.abs((v.Character.Torso.Position - ExplosionPart.Position).Magnitude)*-1)/5)
0
why would you need to invert the magnitude boredlake 256 — 1y
0
To increase the intensiy of the explosion as you get closer IEntity_303I 80 — 1y
0
Camera shake* IEntity_303I 80 — 1y

1 answer

Log in to vote
1
Answered by
boredlake 256 Moderation Voter
1 year ago

If your game is set to R6, this should work

1/((v.Character.Torso.Position - ExplosionPart.Position).Magnitude)
0
Thank you man you really helped out! IEntity_303I 80 — 1y
Ad

Answer this question