Hey guys, so I’m attempting to use Shader to rotate the roller instead of using animator for testing purpose. But I’m not too sure why I’m getting two different behavior in the prefab and in the scene??
If you look at the gif below, the roller behave fine in the scene view, but it have completely different behavior in game view. Originally I thought I’ve set the position node to world, but turns out it was at object the whole time.
My understanding of the setup was, if I pass the position of the object to Rotate About Axis, it should rotate on the given axis on that particular position isn’t it?
When “Static Batching” is enabled, objects of the same material that are static are combined into one mesh to save on draw calls.
To prevent this, you can either disable Static Batching under Edit → Project Settings → Player → Other Settings, or uncheck “static” on the objects.
Thanks for the reply, but I actually don’t have those objects static in my scene. In fact, nothing was static in my scene (which I should totally do to the props).
But still I tried set them to static and disable “Static Batching” in player setting. It still behaving the way I was not expecting. Maybe I misunderstood how this particular Shader would work?
You want both Static & Dynamic batching both disabled, and the meshes not set to static.
I’ve also seen people say this is a problem when the SRP batcher is enabled, so disable that too.
Really, this would be fixed if you could set Shader Graph shaders to not be batched, which is something you can set on shaders, but isn’t exposed by Shader Graph.