Reproduction Steps
System Information
CPU Intel(R) Core™ i7-9700K CPU @ 3.60GHz
GPU NVIDIA GeForce GTX 1050 Ti
Memory: 16.0GB
Reproduction File
reproPlace.rbxl (28.1 KB)
Open this place, go into Run mode, and while observing the central cube with the Trail inside of it, run this code in the command bar:
local Base = workspace.Part
Base.CFrame = CFrame.new(math.huge, 0, 0)
task.wait() -- Wait for the next Heartbeat frame. This doesn't happen if it's immediate.
Base.CFrame = CFrame.new(0, 0, 0)
local r = 0
while true do
task.wait()
r += 5
Base.CFrame = CFrame.Angles(0, math.rad(r), 0) * CFrame.new(0, 6, 6)
end
Once it starts spinning, that means it has already came back from the distance, and is when the Trail should start rendering new segments.
Expected Behavior
I expect the Trail to immediately resume, or at the very least don’t render the path from ~inf to origin, and immediately resume new segments of the Trail’s path.
Actual Behavior
Once the trail comes back, it seems to assume that it’s still out of the ‘rendering space’ for the remainder of the Trail’s lifetime. For example, if the Trail’s lifetime is set to 10 seconds and you CFrame it back, it’ll wait 10 seconds before being visible. It seems to appear back with segments that would’ve existed initially.
I observed this issue while working with PartCache, where it reuses parts by caching them & CFraming them extremely far away from origin, where they can’t be rendered. This is because parenting can be slow, and CFrame is pretty fast to change. It took me over an hour until I figured out this was an issue with Roblox and not my trails, since it was taking about half of a second for my trails to appear, which was approximately the lifetime of the Trail.
Workaround
Make sure that if you do CFrame it far away, to disable any Trails under it before the first render frame where it’s far away, then enable them before the next render frame where it’s near the observable part of the world. That, or disable FaceCamera if that isn’t important to you.
For example, if you run this code instead of the one near the top, which follows the rule directly above, the problem isn’t present. This is my only known workaround.
EDIT: Call Trail:Clear() after moving to and from far away.
local Base = workspace.Part
Base.CFrame = CFrame.new(math.huge, 0, 0)
Base.Trail.Enabled = false
task.wait() -- Wait for the next Heartbeat frame. This doesn't happen if it's immediate.
Base.CFrame = CFrame.new(0, 0, 0)
Base.Trail.Enabled = true
local r = 0
while true do
task.wait()
r += 5
Base.CFrame = CFrame.Angles(0, math.rad(r), 0) * CFrame.new(0, 6, 6)
end
Issue Area: Engine
Issue Type: Display
Impact: Moderate
Frequency: Constantly