vinurd2 Posted Sunday at 08:12 AM Posted Sunday at 08:12 AM In the editor, I see the curvature of the stones in the material, and the shadows. Perhaps it has something to do with the video card as well. As soon as I turn on the game, everything I saw in the editor disappears. At the same time, all the parameters in the video are included. The render, on the contrary, shows that everything is fine. Quote
Solution Josh Posted Sunday at 02:23 PM Solution Posted Sunday at 02:23 PM Enable refraction and tessellation on the game camera by adding those commands to the code. 1 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without.
vinurd2 Posted Sunday at 04:00 PM Author Posted Sunday at 04:00 PM 1 hour ago, Josh said: Enable refraction and tessellation on the game camera by adding those commands to the code. how to access the camera if it already exists on stage. In your examples, everything goes through the main script. I created the component and put it on the camera. How do I connect the tessellation to this particular camera? Quote
Josh Posted Sunday at 04:05 PM Posted Sunday at 04:05 PM In your component, do this: local camera = Camera(self.entity) if camera ~= nil then camera:SetTessellation(4) end Quote My job is to make tools you love, with the features you want, and performance you can't live without.
vinurd2 Posted Sunday at 05:47 PM Author Posted Sunday at 05:47 PM 1 hour ago, Josh said: In your component, do this: local camera = Camera(self.entity) if camera ~= nil then camera:SetTessellation(4) end error Quote
Josh Posted Sunday at 05:55 PM Posted Sunday at 05:55 PM That should be inside the Start() function. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without.
vinurd2 Posted Sunday at 06:09 PM Author Posted Sunday at 06:09 PM 13 minutes ago, Josh said: That should be inside the Start() function. Thanks, everything is working. But with the FPs player script, the effects are disabled. Quote
vinurd2 Posted Sunday at 06:15 PM Author Posted Sunday at 06:15 PM and I found everything, there the player listens for the presence of the camera and then sets the parameters. I did the same and everything worked. if not self.camera then self.camera = CreateCamera(world) self.camera:Listen() end local pos = entity:GetPosition(true) self.camera:SetPosition(pos.x, pos.y + self.eyeheight, pos.z) self.camera:SetRotation(0, 0, 0) self.camera:SetFov(self.fov) self.camera:SetTessellation(3) self.camera:SetRefraction(true) 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.