Hello,
I made a scene that works great in the editor, but there is something odd happening in Web GL. I have a line renderer that I redraw every fixedupdate(). The line renderer changes in vertice position count and vertice position location when other objects move in the scene, because it’s like a laser that reflects off of objects and the those objects move. I’m updating the vertice positions by creating a list and raycasting against colliders (when a collider is hit, the hit point is a vertice position), reflecting off of the colliders that allow reflection and having the final position at any collider hit that doesn’t allow reflection. Then I add the list to the SetPositions function like so SetPositions(listname.ToArray()).. The game always starts fine in Web GL, but when it is time to hit this specific object with the line renderer, the whole line disappears (and right here is the difference between the Web GL vs the editor).
The final object that is hit is using a tag which the ray cast references, so I thought maybe Web GL has issues with tags, but my player character also has a tag and when the line renderer hits him he’s destroyed as expected..
Anyways, it works fine in the unity editor, so I’m assuming it’s a web GL bug, but does anyone have any idea what could be happening in Web GL??
↧