Errors running demos with latest lportal
chrisbare opened this issue · comments
It looks like the examples haven't been updated for the latest changes in lportal. I get this error:
Invalid call to function 'rooms_set_camera' Expected 2 arguments. I fixed it like this:
- var cam1_id = m_RoomManager.dob_register(cam_first, Vector3.ZERO, 0)
- var cam3_id = m_RoomManager.dob_register(cam_third, Vector3.ZERO, 0)
- m_RoomManager.rooms_set_camera(cam_third)
- m_RoomManager.rooms_set_camera(cam_first)
- m_RoomManager.rooms_set_camera(cam1_id, cam_third)
- m_RoomManager.rooms_set_camera(cam3_id, cam_first)
That seems to work, but the camera is not pointed quite right, so make ZERO is the wrong value.
also make a similar change for calls to dob_register.
Yes sorry about that, I made some fixes to the API because some of the assumptions I had made for input from the Godot side was flawed (basically I can't get the position of hidden items because they get detached from the scene tree, so the user has to specify positions manually).
I'm intending to update the demos but I've been waylaid by rewriting the 2d renderers in Godot core. Hoping to get some time to fix up the various LPortal issues but time is rather scarce at the moment!
What should be up to date is the help file for LPortal, if you look up the LRoomManager in Godot IDE help, it should give you the new API (also see the source, it should be quite explanatory). 👍
Ok I've finally had some time and I've updated both the Tutorial Simple demo and the BoxRooms for the new API. I still need to make a new release build for 0.2 for people who are not building from source. 👍