Un_Do45
(Kanzou)
July 11, 2023, 2:53am
#1
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. :]
1 Like
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.
Before spring:
After Spring:
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 …
Un_Do45
(Kanzou)
July 11, 2023, 3:39am
#3
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)?
1 Like
Un_Do45
(Kanzou)
July 11, 2023, 6:37am
#5
ah. i found it before. but i didn’t understand anything from it, ill try using what u said
Un_Do45
(Kanzou)
July 11, 2023, 6:39am
#6
i apologize if i took awhile to respond
Un_Do45
(Kanzou)
July 11, 2023, 6:39am
#7
also. could you elaborate what “factor” is?, sorry if i don’t know anything that well.
Un_Do45
(Kanzou)
July 11, 2023, 7:31am
#8
and i forgot to mention what is the “unlocked sway” (wait nvm its a VEC2)
1 Like
Un_Do45
(Kanzou)
July 11, 2023, 8:01am
#9
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?
system
(system)
Closed
July 29, 2023, 12:10am
#11
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.