Jump to content

alpha on the roofs of houses


ezegge
 Share

Recommended Posts

good morning

 

I recently acquired the Leadwerks, I was doing various things, but wanted to help me with something. I want a character cross when the door of a house roof is made transparent (3rd person seeing it on the character)

 

From already thank you very much.

Link to comment
Share on other sites

I'm assuming you mean top-down camera instead of 3rd person since you want the roof to disappear when the player walks in. If that's the case, here's the general approach.

 

Start by performing a raycast (Pick) from your camera to the player and enable the [closest] parameter.

http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/camera/camerapick-r199

 

If the returned pickInfo.entity is not your player, then you can assume some kind of overhang (roof) is covering the player. Swap the material on the overhang.

http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/material/materialsetshader-r247

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...