How to achieve this viewmodel walking animation?

CREDIT - GAMES UNITE


I want some viewmodel walking animations similar to this using math, is there any way to make it look very similar to the one shown in the video?

The problem is that my current walking animation looks floaty and gross to look at.

1 Like

First off you should credit GamesUnite for the video as theyre still in development :smile:

Second off @Falosaur / GU Animator made the walk thru Blender (correct me if Im wrong) so there wouldnt be much math involved in the first place, Im sure Fal could come up with something mathematically if they were to reply

I personally have a sincos function that gets pretty close to this.

local currentTime = tick()
local x = math.cos(currentTime*10)*.06;
local y = math.abs(math.sin(currentTime*10))*.06;
WalkingCFrame = CFrame.new(x,y,0)
4 Likes

yea sorry about not crediting ill update it, but im pretty sure the walk cycle is done with math cause each weapon has the same one, and it moves on velocity.

Okay so basically, I implemented that math, and made it use velocity, but it also picks up the velocity of the player when falling or jumping, and I have no clue on how to prevent this.

local CurrentTime = tick()
local x = math.cos(CurrentTime*10)*.06;
local y = math.abs(math.sin(CurrentTime*10))*.06;
		
--//
local Velocity = (self.HRP.Velocity.Magnitude)
local VelocityClamped = math.clamp(Velocity * .25, 0, 10)
	
WalkCFrame =WalkCFrame:Lerp( CFrame.new(x * .1 * VelocityClamped, y * .35 * (VelocityClamped),0) * CFrame.Angles(y * .05 * (VelocityClamped), y * .05 * (VelocityClamped), 0), 0.12)

here is the code.

2 Likes

Magnitude also applies to jumping and falling as well, not sure how to fix it but there might be a few articles dealing with clamps whilst in air :smile:

I personally reduced that effect by adding another feature: landing and jumping viewmodel “Bob”