Mesh Flickering For Seemingly No Reason

For some reason my pets are flickering at some points for no reason. This is not a one time bug either, it happens a lot. And it appears it replicates to other clients as well with the flickering.

Btw everything is anchored and this flickering it does in the video is only the polite version of it. Sometimes it is even worse than this and can cause epilepsy.

--Code responsible for making the pet render
local function MoveTowards(pet, targetCFrame, speed, minDistance, maxDistance, lerpAlpha, deltaTime)
	local PetPivot = pet:GetPivot()
	if not PetPivot then return end
	local distance = math.clamp((targetCFrame.Position - PetPivot.Position).Magnitude, 0, maxDistance)

	local alpha = lerpAlpha * distance
	pet:PivotTo(PetPivot:Lerp(limitCFrameY(targetCFrame,minY,maxY), alpha))
end

Structure of pet:
image
Video of it happening:

A private message is associated with this bug report

3 Likes

I have a theory. Could it be related to that I scaled up these models in studio and that messed with the bones?

more of looks like you found some hacky way to force floating point precision error, doesn’t look like a issue with how you move the model.

1 Like

If you know, what was the approximate scale difference between the original imported model and the resized one? There might be some precision errors occuring as bones (afaik) don’t have a scale property.

1 Like

I also thought that may be the problem, if you look the way the models move you see it clearly.

Yeah, try reimporting with the correct scale and not resizing them.

Thanks for the report! Just to confirm, we have a ticket filed and we’ll follow up when we have an update for you.