playMaker

Author Topic: Get Terrain Texture Name At Game Object Position  (Read 12099 times)

Dev_Sebas

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 398
    • Blog
Get Terrain Texture Name At Game Object Position
« on: October 16, 2013, 06:05:17 PM »
Hi! :)
Just finished this custom action, it let´s you get the main texture splat map name at a certain game object position.
It´s very useful for example if you what to play a certain footstep sound dependent on your game object position. It will only give you the texture name but you can compare the given name and play different sounds, particles. Very useful for fps/rpg games.
WIP-if script can´t get terrain position it will return null.
All the best
Cheers
Seb
« Last Edit: October 16, 2013, 07:04:38 PM by Sebastião »

choi

  • Playmaker Newbie
  • *
  • Posts: 40
Re: Get Terrain Texture Name At Game Object Position
« Reply #1 on: October 17, 2013, 08:35:05 AM »


Thank you.
This feature is useful.

Dev_Sebas

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 398
    • Blog
Re: Get Terrain Texture Name At Game Object Position
« Reply #2 on: July 15, 2014, 05:07:09 PM »
If anyone want to finish this action with some new features it would be nice.
Cheers

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Get Terrain Texture Name At Game Object Position
« Reply #3 on: July 16, 2014, 09:17:47 AM »
Hi,

 Like what features?

 Bye,

 Jean

Dev_Sebas

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 398
    • Blog
Re: Get Terrain Texture Name At Game Object Position
« Reply #4 on: July 16, 2014, 05:23:46 PM »
Hi Jean
Well...maybe by now it´s ok, just thinking about optimisation and debug.
It would be nice if incorporated in ecosystem.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Get Terrain Texture Name At Game Object Position
« Reply #5 on: July 17, 2014, 08:31:33 AM »
Hi,

 Ok, It's up on the ecosystem, and I made an entry on the RSS

I have renamed the class for consistency and added some tooltips as well, but basically it's all good as far as I can see.


 Bye,

 Jean

Dev_Sebas

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 398
    • Blog
Re: Get Terrain Texture Name At Game Object Position
« Reply #6 on: July 17, 2014, 08:58:13 AM »
Thanks Jean ;D

kici

  • Junior Playmaker
  • **
  • Posts: 63
    • KZ Development
Re: Get Terrain Texture Name At Game Object Position
« Reply #7 on: July 17, 2014, 11:06:37 PM »
amazing work you guys.

devotid

  • Playmaker Newbie
  • *
  • Posts: 45
Re: Get Terrain Texture Name At Game Object Position
« Reply #8 on: October 25, 2015, 11:24:47 AM »
I am using this but generating my terrains dynamically. Can someone show me how to set the Terrain object with a FSmDefault object variable?  THe only way I can set a terrain now is to drag it in. 

THanks very much for this.

foxdeltagames

  • Junior Playmaker
  • **
  • Posts: 62
Re: Get Terrain Texture Name At Game Object Position
« Reply #9 on: October 26, 2015, 12:51:22 PM »
Will this only work on terrains, or this can be used with any object like custom made floor object?

devotid

  • Playmaker Newbie
  • *
  • Posts: 45
Re: Get Terrain Texture Name At Game Object Position
« Reply #10 on: October 27, 2015, 06:00:39 AM »
I am using this but generating my terrains dynamically. Can someone show me how to set the Terrain object with a FSmDefault object variable?  THe only way I can set a terrain now is to drag it in. 

THanks very much for this.

Anybody?

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Get Terrain Texture Name At Game Object Position
« Reply #11 on: October 27, 2015, 06:58:20 AM »
I am using this but generating my terrains dynamically. Can someone show me how to set the Terrain object with a FSmDefault object variable?  THe only way I can set a terrain now is to drag it in. 

THanks very much for this.

Anybody?

Find GameObject by name?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

devotid

  • Playmaker Newbie
  • *
  • Posts: 45
Re: Get Terrain Texture Name At Game Object Position
« Reply #12 on: October 27, 2015, 09:37:26 PM »
I have done that already and stored it in a object variable. UnityEngine.Terrain but I cannot set the action unless I physically drag the terrain into the action inspector area. There is no way to set a variable to it..... You can ONLY drag it in.

Thus I cannot set it dynamically.

I have tried to alter the action to make it like a FsmDefault drop down but I cannot do it for a Terrain Object.  I simply dont know enough about C# scripting to set up the terrain as a "setable" value.  I have hacked a way for now by using

Terrain.activeTerrain = terrain;

Which will just get the active terrain in the scene that they are currently above... but if the users goes to another terrain it will crash as the terrain is not the "active one"

Thanks again. I really appreciate the help.

devotid

  • Playmaker Newbie
  • *
  • Posts: 45
Re: Get Terrain Texture Name At Game Object Position
« Reply #13 on: November 02, 2015, 04:58:07 PM »
Bump.  ::) :)

Krillan87

  • Beta Group
  • Full Member
  • *
  • Posts: 185
Re: Get Terrain Texture Name At Game Object Position
« Reply #14 on: March 03, 2017, 07:51:33 AM »
I would like a bump as well! I tried adding that feature in the scrip but I can't really find where to put it, I seems like choosing a variable is something standard that automatically comes to all actions, so maybe there is not possible to choose the terrain with a variable?  :-\