0 votes

Can splitscreen be accomplished without viewports?

The main problem we are having is that our IK system transforms a set of targets that need to be a child node of a camera. The viewport stops child nodes from being transformed, and always ends up with the wrong translation/rotation no matter where the code is coming from.

Godot version 3.5.1
in Engine by (138 points)

1 Answer

0 votes

For anyone who finds this:

I accomplished this by attaching the IK transform code to the parent player node. The viewport should have only one node -- the camera only. Use get_viewport().get_camera() to make transform calls on the camera node. Use a forward xform of a basis of your view rotation to make sure the IK system projects itself in the right direction. Example: view_rotation().xform(Vector3.FORWARD) * DISTANCE

by (138 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.