playMaker

Author Topic: Doll House Camera Concept  (Read 817 times)

Fictatious

  • Playmaker Newbie
  • *
  • Posts: 7
Doll House Camera Concept
« on: March 18, 2021, 04:53:43 PM »
I'm trying to create a Doll House styled camera ala Luigi's Mansion and I just can't seem to find a consistent way to do it. a simple way would just be making one sided walls but that falls apart a bit when you try to multiple rooms in hallways. I've tried raycasting between the camera and player but I honestly can't quite figure out a way to get the wall to vanish. Suggestions appreciated!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Doll House Camera Concept
« Reply #1 on: March 18, 2021, 08:48:58 PM »
hi.
maybe some triggers on the camera to fade walls

Fictatious

  • Playmaker Newbie
  • *
  • Posts: 7
Re: Doll House Camera Concept
« Reply #2 on: March 19, 2021, 03:27:54 AM »
hi.
maybe some triggers on the camera to fade walls

What Action would I use to accomplish this (obviously triggers) I tried a trigger + layer fade function but the logic behind it ended up becoming extremely messy

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Doll House Camera Concept
« Reply #3 on: March 19, 2021, 01:06:53 PM »
Hi.
If wall have the trigger events then make a separate fsm for trigger event.

State 1 have a trigger stay and a Set bool value 'false' (name it "In Trigger" for example) and connect to state 2
State 2 have a trigger exit and a Set bool value 'true' and connect to state 1.
Then have a 2nd fsm and use 'Fsm Bool Test' (to check "In Trigger")
if in trigger fade out then after fade out you can check again if in trigger is false to fade in.

This might not be the most efficient way tho.

A different way would be using arrays and a Overlap Box action (Ecosystem)
have 1 array with all 'Unfaded' walls, then have a 2nd array with 'Faded' Walls

when overlap box used loop thru the 'overlap' list and see if exists in the 'Unfaded'
 list.
if so then send event to it to fade and remove it from the 'Unfaded' and add it to the 'Faded' List.
Then loop thru the 'faded' list to see if they are in the 'overlap' list.
If not then send event to Unfade and add to the 'Unfaded' List.
Then have a short delay before looping back to check again.

Its best to use Array Maker (Ecosystem) than the build in arrays.

This way would probably more efficient as you don't need to have trigger events on each wall, but is a bit more complex to setup.
« Last Edit: March 19, 2021, 03:15:48 PM by djaydino »

Fictatious

  • Playmaker Newbie
  • *
  • Posts: 7
Re: Doll House Camera Concept
« Reply #4 on: March 20, 2021, 06:38:16 PM »
Hi.
If wall have the trigger events then make a separate fsm for trigger event.

State 1 have a trigger stay and a Set bool value 'false' (name it "In Trigger" for example) and connect to state 2
State 2 have a trigger exit and a Set bool value 'true' and connect to state 1.
Then have a 2nd fsm and use 'Fsm Bool Test' (to check "In Trigger")
if in trigger fade out then after fade out you can check again if in trigger is false to fade in.

This might not be the most efficient way tho.

A different way would be using arrays and a Overlap Box action (Ecosystem)
have 1 array with all 'Unfaded' walls, then have a 2nd array with 'Faded' Walls

when overlap box used loop thru the 'overlap' list and see if exists in the 'Unfaded'
 list.
if so then send event to it to fade and remove it from the 'Unfaded' and add it to the 'Faded' List.
Then loop thru the 'faded' list to see if they are in the 'overlap' list.
If not then send event to Unfade and add to the 'Unfaded' List.
Then have a short delay before looping back to check again.

Its best to use Array Maker (Ecosystem) than the build in arrays.

This way would probably more efficient as you don't need to have trigger events on each wall, but is a bit more complex to setup.

Thanks I ended up going with additive load and unload for rooms. Though I know a future scene in my game that this method will be super useful.