#Camera Recoil

1 messages · Page 1 of 1 (latest)

lyric sphinx
#

In poor words, I need to code some camera recoil for my CrackShot guns (I have the events needed already).

How would I do that?
I tried teleporting the player to the same location with different yaw/pitch, but it didn't work unfortunately

lyric sphinx
#

bump

trail fiber
lyric sphinx
#

I just need some effect to manage the player's camera

chrome valve
#

Afaik, teleporting the player and setting their pitch is the only way to do it in skript

trail fiber
#

You can set their yaw

#

Without teleporting

chrome valve
#

Fr?

#

What's the format for that

#

Just "set player's yaw to x"?

trail fiber
#

I think so yea

#

Ive never used it

#

But it looks like it

chrome valve
#

Are you sure, I always thought that wasn't possible

#

¯_(ツ)_/¯

lyric sphinx
chrome valve
#

Yeah

lyric sphinx
#

Let me try

#

Tried this, but nothing happens (no errors either).

#

set {_r} to (pitch of shooter + 1)
set pitch of shooter to {_r}

#

(shooter is the same as using player for the event I use btw)

chrome valve
#

For testing, probs wanna use a bigger pitch increase

#

Also try debugging stuff to make sure it's actually doing what you think it is

#

Im fairly doubtful of directly setting the pitch of a player being a thing

trail fiber
#

(1 is tiny in pitch)

chrome valve
#

Pitch goes from 90 to -90

distant pawn
#

Either teleport or use reflect with #setRotation(yaw, pitch) without teleporting