#Animation first person bug.
1 messages · Page 1 of 1 (latest)
what is it doing wrong
like turning ur char or what?
The script you have moving your head might be trying to move past its allowed limits when you look down and turning your body to compensate
how do i add the limit for it
let me send you the script of the camera
sorry i didnt specify i thought i did. looking down makes the entire body freak out and rotate left right left right but looking up makes the flashlight dissapear
so i was confused why
maybe this could help
but the flashlight im usin
hold up lemme show you
You'll want to add a math.clamp to the pitch variable that makes sure it doesn't
the "Handle is the black part. the "Part" is the glowy sphere.
maybe i should add ana invisible handle
** You are now Level 10! **
thanks
hmm ill try
just clamp it between the values of -1 and 1
alright
and hopefully that'll limit it enough
and that will stop the body from going crazy right
most likely
in the server script right
It honestly doesn't matter which
alright
you could change the local pitch variable in the local script to
local pitch = math.clamp(math.asin(lookVector.Y), -1, 1)
okay lemme see
If it doesn't work immediately, try -.9, .9 or -.8, .8
Might need to mess with the numbers a bit
Personally when doing things like head movement I prefer to just use IKControls. Has built-in limiters that you can set
i tried it
it worked it made the head limit rotation
but i dont think it made it fix
i think the reason was the camera
if i put the camera at 45 degrees down. its alright anything less is no.
remember only the camera not the head
Hm
Wait, does it only turn like that when you're specifically holding the flashlight?
Honestly, I'd just swap to IKControls
hmm alright ill have to reanimate them
Wdym
nevermind now
i tried debugging
i disabled all the scripts that make the head turn vertically too.
it still continued
so imma see other scripts
yep i found it
its a camera wobble effect i added for realism. only to the camera though i dont know why it was messing with other parts
oh lol