What do you want to achieve? I wanna make an INS: Sandstorm styled sway cuz cool
What is the issue? i have no clue on how to make one, i’ve tried before but failed
i’ve tried doing it by myself but i ended up with a broken mess. so i’ve resorted to the last resort
by making a devforum post. if u can help me i’d appreciate. :]
This is my method, there are others.
Here made something, cool to spring up your FPS view model:
It’s a local script which uses
Quenty’s spring module to add a spring effect to the otherwise static view model.
Code, insert into your starterCharacter scripts as a local script and test it out. Values for the spring will need adjusting of course.
–Edit: Here’s a better working version with the dampening actually working, messed up the previous CFrame calculation. Still have no …
its a spring module. that doesn’t really help me that much tbh
Just realized and got a new idea you can do BlackShibe box approach for this and found another post asking the same question.
Store the “unlocked sway” in a local vector 2 value. Since this offset is constant even if you stop rotating the mousr.
Add the mouse delta to the local variable multiplied by some factor for sensitivity adjustment.
Apply it using angles (see below)
Clamp the Vector2 X and Y values to prevent over rotation
CFrame.new(mouseDelta.x/200, mouseDelta.y/200, 0) => CFrame.new(-mouseDelta.x/200, mouseDelta.y/200, 0)?
ah. i found it before. but i didn’t understand anything from it, ill try using what u said
i apologize if i took awhile to respond
also. could you elaborate what “factor” is?, sorry if i don’t know anything that well.
and i forgot to mention what is the “unlocked sway” (wait nvm its a VEC2)
aight. i’ve found a possible solution to my issue. however. the mouseDelta position cannot rotate. due to it being in first position which sux. i’ve tried using :GetMouseDelta() but it will go back to 0 once the mouse has stopped moving. are there any other mousedelta functions im unaware of?
i’ve finally did it. by using VEC2. and some mousedelta crap. i’ve finally did the insurgency styled sway. i shall now close dis devforum post. thanks for helping me :]
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.