|
Post by Luigi on Apr 18, 2017 20:41:59 GMT
Hello, here is my problem: I am trying to define rooms based scrolling using numeric boundaries the first trigger works but, when it should collide with the second trigger the camera won't move.
let me specify that I am using Platformer PRO too, that relies on layers to function. Any suggestion?
|
|
|
Post by Luís Pedro Fonseca on Apr 18, 2017 23:59:58 GMT
Hi Luigi, The TriggerBoundaries is not ideal for these situations. You probably want to use the Rooms extension: www.procamera2d.com/user-guide/extension-rooms/ProCamera2D should work perfectly fine with Platformer Pro, like with any other plugin that doesn't interfere with cameras.
|
|
|
Post by Luigi on Apr 20, 2017 11:53:05 GMT
I need to show even a little of the adjacent rooms, not something like the old Zeldas. Is it possible do play it someway?
|
|
|
Post by Luís Pedro Fonseca on Apr 20, 2017 12:34:01 GMT
In that case the easiest way is to turn off "Automatic Room Activation" on the Rooms extension. And then you can manually switch between rooms using the "EnterRoom" method.
This way you can build overlapping rooms.
|
|
|
Post by Luigi on Apr 20, 2017 12:48:39 GMT
I'll work it out and post asap, thankyou Luis!
|
|
|
Post by Luigi on Apr 26, 2017 21:52:31 GMT
Sorry to ask again: I'm trying to write something easy like this if (GetCurrentRoom(v) == 0) EnterRoom (1); but I really could not find anywhere the correct hierarchy to access to those methods. I can't find it under ProCamera2D.Instance, searched even on the old thread in unity forum.
|
|
|
Post by Luís Pedro Fonseca on Apr 27, 2017 10:17:11 GMT
luigi, it seems you're lacking some fundamental knowledge on how component access works in Unity. You need to access a component before trying to call its methods. The "ProCamera2D.Instance" is a static variable and it gives you access to the core component. To get an extension you need to do something like: var myRoomsExtension = ProCamera2D.Instance.GetComponent<ProCamera2DRooms>(); And only then you can call the methods using the variable of the rooms extension you just created.
|
|
|
Post by Luigi on Apr 28, 2017 8:13:42 GMT
Yep, I'm new to Unity so thankyou for the help, it's always welcome. I did believe that those methods were static but it make sense they arent, being rooms an extension of the core. Let me express another doubt: is there a way to move the camera to a vector point with a smooth movement?
|
|
|
Post by Luís Pedro Fonseca on Apr 28, 2017 8:30:16 GMT
There a few methods to achieve that, but the easiest option is to create an empty GameObject at that location and add it as a camera target.
|
|
|
Post by Luigi on Apr 28, 2017 21:15:41 GMT
Targets are perfect
|
|