playMaker

Author Topic: [SOLVED] Hiding/Showing Wall on Raycast Hit  (Read 3223 times)

knownasa

  • Playmaker Newbie
  • *
  • Posts: 14
[SOLVED] Hiding/Showing Wall on Raycast Hit
« on: February 15, 2017, 12:37:37 PM »
Hi guys, my name is Amarino and I'm starting a new project with my 2 younger brothers about game development. The idea is for us to show the world the process and the struggles of becoming game creators from noobs to pros. Here is our blog: http://bigbrotherzgames.tumblr.com/

So, the problem we have is as follows: we already achieved the hiding phase with Set Visibility and a Camera with the Raycast and a Smooth Follow Action. But there's one big problem as problems go... we want to do that with animation!

Here is the video as reference:
Any ideas on how to make the walls go transparent with animation instead of going brutally from visible to not visible?

Thank you in advance!
« Last Edit: February 16, 2017, 08:54:22 AM by knownasa »

terri

  • Sr. Member
  • ****
  • Posts: 386
    • terrivellmann.tumblr.com
Re: Hiding/Showing Wall on Raycast Hit
« Reply #1 on: February 15, 2017, 06:11:47 PM »
do you know how to make it transparent, without the animation bit?

knownasa

  • Playmaker Newbie
  • *
  • Posts: 14
Re: Hiding/Showing Wall on Raycast Hit
« Reply #2 on: February 16, 2017, 08:54:03 AM »
do you know how to make it transparent, without the animation bit?

Hi mate, I was finally able to do this with animation. I did it with DOTween, which is an amazing addon to Unity and Playmaker.

To do this without animation you can follow these steps:

1 - Add a Raycast from the Camera to the Player
2 - Add a new Layer called Transparent (whatever name you want) and assign it to the objects you want to make transparent
3 - On the Raycast FSM add a Layer Mask of value 1 and select the layer you created (this will make the Raycast only hit selected layers)
4 - Make sure you have hit object saving a variable
5 - Add a new state with "Set Visibility" and in the object the Raycast just hit and untick the "Visible" if it's ticked
6 - In the same second state add a "Next Frame Event" and send it back to the first state (makes sure when the Raycast isn't htting anything everything goes back to normal)

I can post a screenshot in here later of this process. If you want it with animation I can post it in here too.

terri

  • Sr. Member
  • ****
  • Posts: 386
    • terrivellmann.tumblr.com
Re: [SOLVED] Hiding/Showing Wall on Raycast Hit
« Reply #3 on: February 16, 2017, 05:53:16 PM »
I can post a screenshot in here later of this process. If you want it with animation I can post it in here too.

Nah its cool thanks, its simple, just wasn't sure at what level you were before helping out.


knownasa

  • Playmaker Newbie
  • *
  • Posts: 14
Re: [SOLVED] Hiding/Showing Wall on Raycast Hit
« Reply #4 on: February 17, 2017, 09:22:00 AM »
I can post a screenshot in here later of this process. If you want it with animation I can post it in here too.

Nah its cool thanks, its simple, just wasn't sure at what level you were before helping out.

Oh it's ok! Thanks :) I will for sure post in here a lot in the future since I'm the newbiest of newbies.

MrHillyCraft

  • Playmaker Newbie
  • *
  • Posts: 1
Re: Hiding/Showing Wall on Raycast Hit
« Reply #5 on: September 10, 2018, 03:38:30 PM »
do you know how to make it transparent, without the animation bit?

Hi mate, I was finally able to do this with animation. I did it with DOTween, which is an amazing addon to Unity and Playmaker.

To do this without animation you can follow these steps:

1 - Add a Raycast from the Camera to the Player
2 - Add a new Layer called Transparent (whatever name you want) and assign it to the objects you want to make transparent
3 - On the Raycast FSM add a Layer Mask of value 1 and select the layer you created (this will make the Raycast only hit selected layers)
4 - Make sure you have hit object saving a variable
5 - Add a new state with "Set Visibility" and in the object the Raycast just hit and untick the "Visible" if it's ticked
6 - In the same second state add a "Next Frame Event" and send it back to the first state (makes sure when the Raycast isn't htting anything everything goes back to normal)

I can post a screenshot in here later of this process. If you want it with animation I can post it in here too.

Hello, could you show the screenshots or the code?
Thanks.