vinurd2 Posted August 3 Posted August 3 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 August 3 Solution Posted August 3 Enable refraction and tessellation on the game camera by adding those commands to the code. 1 1 Quote Let's build cool stuff and have fun.
vinurd2 Posted August 3 Author Posted August 3 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 August 3 Posted August 3 In your component, do this: local camera = Camera(self.entity) if camera ~= nil then camera:SetTessellation(4) end Quote Let's build cool stuff and have fun.
vinurd2 Posted August 3 Author Posted August 3 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 August 3 Posted August 3 That should be inside the Start() function. 1 Quote Let's build cool stuff and have fun.
vinurd2 Posted August 3 Author Posted August 3 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 August 3 Author Posted August 3 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.