|
Post by beanbandit on Mar 15, 2020 11:45:18 GMT
Hello, I've very recently started using Pro Camera 2D and the #1 biggest issue I'm having with it is that if my player enters a room via changing scenes, i.e., they didn't walk into the room but spawned inside of it, the room just uses default settings and completely ignores any Scale to Fit or Zoom settings I've set up. If I walk out of the room and then back in, it functions as intended, but these settings do nothing if the player starts in the room.
Given how widely used and recommended pro camera is, I have to imagine I'm just missing something, right?
|
|
|
Post by Luís Pedro Fonseca on Mar 17, 2020 8:22:36 GMT
Hey beanbandit, I'm assuming you're maintaining the same camera for all scenes. In that case you have to manually trigger the transition. You can use the methods "ComputeCurrentRoom" to get which room the target currently is, and then use the method "EnterRoom(roomIndex, useTransition: false)" Let me know if this helped.
|
|
nev
New Member
Posts: 2
|
Post by nev on May 21, 2020 3:42:53 GMT
Hello, I'm having the same type of issue as beanbandit. However, I'm not maintaining the same camera for all my scenes but using the AddCameraTarget method that you suggested since I maintain the same player throughout all my scenes. I have an outside level with NPC houses. When I go into a house scene and come back out to the outdoor scene and into a Room that I didn't walk into, the camera targets my player and not the Room. I'm having trouble figuring out how to call the ComputeCurrentRoom and EnterRoom methods you mentioned in this post. I'm not sure what I'm missing but I hope you can help.
Thanks
|
|
|
Post by Luís Pedro Fonseca on May 23, 2020 8:51:43 GMT
nev Those methods are part of the Rooms extension. So you basically need a reference to the extension and then call it when you want to "refresh" the current room. Let me know if that helped.
|
|
nev
New Member
Posts: 2
|
Post by nev on May 23, 2020 19:34:59 GMT
Sorry, but it only works if I set ResetRoom() to a Getkey. When I press the key it appears to reset the (Use Numeric Boundaries) checkbox on my main camera. If I put ResetRoom in void Start it does nothing. private void Update() { if (Input.GetKey(KeyCode.E)) { ResetRoom(); } } public void ResetRoom() { theRooms.EnterRoom(roomIndex = 2, useTransition = false, forceEntrance = true); }
|
|
|
Post by Luís Pedro Fonseca on May 30, 2020 17:50:42 GMT
nev I'm not sure I understand your problem. Can you please explain further or send me through PM a project that replicates the issue?
|
|