-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Camera Artifacs #67
Comments
Hi, yeah, the render pipeline does not expect the camera to be parented to another nodepath. I will see if I get to implement this for the next Release, in the meantime you can use a task which synchronises the camera position to the desired nodepath. |
Right! I will wait for you! Please try to fix soon, because into my controller system, when i update the camera position into task, the results very, very poor. Thanks for the attetion. |
Make sure the task has the right sort, so that your logic happens first, then the camera position is synchronized, and the render pipeline updates. The rp updates all have a sort greater zero, so try running your game logic with a sort of -10 and your camera synchronization with a sort of -5 or so. I am currently in vacation, so I can't do much until next week :) |
I found the origin of problem! Analyzing the glitchs, i see they follow a pattern, and they occour's only into skybox, and how many times i test, less glichs occour's. So when i try you manual solution suggestion, i find the origin of error, and a perfect workaround. The error occour's because the RP cannot get the starter position of camera when his is a child of another thing, and he is getting some memory info trash, and receiving invalid coordinates. But, if i can set manualy only the original position, the RP can apply any other transformations correctly, and here is the workaround: base.camera.setPos(self.orb.getPos() + self.playerNP.getPos() + Vec3(0, 2.5, 0)) Basically, i am manualy setting the camera position into his future child position, then i make it a child, after this, the RP can correctly calculate the camera position and all glich's are solved. Now i belive is much more easy to you to found a definitive solution ;) Att. R.M.Lehnemann |
Only a minor update, i found another error, the cascade shadow map, he can't update correctly the camera position, so when i go so far, the shadow quality become very very poor. But for this problem the solution is more simple, put a if into the cascade shadow map, if the camera is a child, use the father coordinates. Note: please consider multiple child levels, bacause into my System the camera is a child of child. :P |
No more fix is needed, problem as definitely solved. If you need reparent a camera, instead create a empty node, them use the following command: base.camera.setTransform(self.EmptyNode.getNetTransform()) Solved. The camera now will recive all transforms of child component. |
Cool, glad to hear you found a solution! I will leave this PR open though, since I think the render pipeline should automatically be able to detect this (by always using the correct transform) |
Right, i found a little glitch when i try to resposition my camera.
Here is a screenshot before i active the function:
... and here is a screenshot after i active the function:
And here is the function:
def CameraReposition(self):
base.camera.reparentTo(self.point)
base.camera.lookAt(self.orb)
The problem is directly related with the "reparentTo" command.
The text was updated successfully, but these errors were encountered: