I’ve been experiencing an issue where when changing the surface normal of the texture, the texture would seemingly not fade between one normal and another - by normal I am referring to the orientation of the bones in the deformed mesh.
Here is the issue showcased:
https://cdn.discordapp.com/attachments/497905299630456834/817132661839101962/hfFpQtikiI.mp4
Each bone is applied on every vertex of the mesh, and what I am doing to get the “ocean” is apply the gerstner waves formula to each bone.
The arrows are the visualized CFrames of each bone (for performance purposes I only render those close to the camera), showcasing that there doesn’t seem to be anything wrong with the CFrame’s being set. I have also verified that there are no NaN values.
The only important piece of code is this (Data[3]
being the bone):
Code in text-form
if (CenterCF.Position - WorldPos).Magnitude < 45 then
Gizmo:DrawArrow(WorldPos, WorldPos + Normal)
end
Data[3].WorldCFrame = CFrame.lookAt(WorldPos, WorldPos + Normal)
I’ve already tried a lot of solutions to this such as disabling CastShadow (I am using Future
lighting technology), but the only solution currently is to only edit WorldPosition
and not touch the orientation - I don’t want to do that because the mesh would reflect lighting weirdly.
Are there any solutions to this, or is this a Roblox bug? Any help would be appreciated, thanks.
cc @vrtblox @zeuxcg