playMaker
Home
Store
Showcase
Tutorials
Forums
Manual
Wiki
About Us
Playmaker Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Join our
Discord Channel
Home
Help
Search
Login
Register
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
(Moderator:
600
) »
Terrain Detection (Solved)
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Terrain Detection (Solved) (Read 1732 times)
Bainto
Playmaker Newbie
Posts: 36
Terrain Detection (Solved)
«
on:
June 25, 2018, 08:50:58 AM »
Is there anyway to create a terrain detection script for a char, where instead of playing the basic clopping of the prefab it plays sounds based on what terrain the char is on?
«
Last Edit: July 02, 2018, 09:37:34 PM by Bainto
»
Logged
verybinary
Junior Playmaker
Posts: 81
Re: Terrain Detection
«
Reply #1 on:
June 26, 2018, 10:50:06 AM »
when character is grounded, raycast down, compare the name of the hit object with events and send to the event that plays the correct sound.
Logged
http://themuseumofdigital.com
djaydino
Administrator
Hero Member
Posts: 7621
Re: Terrain Detection
«
Reply #2 on:
June 26, 2018, 07:22:56 PM »
Hi.
You can also compare the material if materials are changing during run time on the object.
This way you can dynamically change the effects on the same object.
Logged
Join the PlayMaker Discord Channel!
Bainto
Playmaker Newbie
Posts: 36
Re: Terrain Detection
«
Reply #3 on:
June 26, 2018, 10:09:28 PM »
I have probably 5 different terrains or so that the char will play on is there anyway id be able to have a bit more detail as im really new XD ty for the help and ill attempt to figure it out in the meantime with the thought of using raycasting.
Logged
Bainto
Playmaker Newbie
Posts: 36
Re: Terrain Detection
«
Reply #4 on:
June 29, 2018, 05:17:22 PM »
and.... im lost lol
Logged
djaydino
Administrator
Hero Member
Posts: 7621
Re: Terrain Detection
«
Reply #5 on:
June 30, 2018, 12:38:25 PM »
Hi. do you understand how raycast works?
with the raycast you need to detect the ground object, then you can get the name/layer/tag/material and so on from that object.
Then you can use that information to determine what terrain you are on.
Here is one of my older videos about raycast :
//www.youtube.com/watch?v=OY8tYHCwFZI
Logged
Join the PlayMaker Discord Channel!
Bainto
Playmaker Newbie
Posts: 36
Re: Terrain Detection
«
Reply #6 on:
July 01, 2018, 05:00:24 AM »
ty ill try this in the am
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
(Moderator:
600
) »
Terrain Detection (Solved)