2
\$\begingroup\$

In unity you can do:

Camera.onPreCull += OnPreCullCamera;
void OnPreCullCamera(Camera3D cam){
//...
}

But in Godot I don't know what the equivalent is. How do you add a function to the sequence which takes place before culling the camera. Thanks.

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

I don't think there is an equivalent, nor understand why you need it (I would expect that you can work in _Process). The closest I can think of is the frame_pre_draw signal of RenderingServer.

Addendum: You can get the Viewport inside of which a Node is with GetViewport() and get the Camera3D of said Viewport like this GetViewport().GetCamera3D().

\$\endgroup\$
2
  • \$\begingroup\$ The reason I think I need it is this script: github.com/aras-p/UnityGaussianSplatting/blob/main/package/… on lines 38 and 182. I'm trying to convert it to Godot, but it's a process. I'm not entirely sure why the function on 182 needs to happen when it does, but maybe you can tell me if it does. \$\endgroup\$ Commented Oct 25, 2023 at 17:19
  • 1
    \$\begingroup\$ Does the behaviour differ from what you want in any significant way when you put this code in _Process or in a response to the frame_pre_draw signal instead? If so, be sure to document that in your question. If you can't determine that yet, then you have not yet identified a need for an equivalent to OnPreCullCamera, and you should proceed further with your experiments until you have concrete evidence one way or the other. \$\endgroup\$ Commented Oct 25, 2023 at 18:39

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.