playMaker

Author Topic: Get Material Index Name  (Read 64 times)

Rabassa

  • Playmaker Newbie
  • *
  • Posts: 4
    • View Profile
Get Material Index Name
« on: November 08, 2018, 03:12:39 PM »
Hello,

Is there anyway to get the material index of mesh? For example if I have a player walking on an object that has multiple textures, I'd like to know what texture the player is currently on.
Thanks,
rich

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 13512
  • Official Playmaker Support
    • View Profile
Re: Get Material Index Name
« Reply #1 on: November 09, 2018, 12:26:40 AM »
Hi,

 Ok, can you try the action GetRaycastHitInfoMaterial on the ecosystem, I just made it, let me know if it works for you.

- you need a meshCollider to raycast onto
- you need to reference a meshRenderer or a skinnedMeshRenderer.

If it doesn't work, can you send me a prefab of the object ( with mesh and material and meshcollider) you are trying to get material from?

 Bye,

 Jean