Get Phys Mat properties in 279b


(SugarBoxing) #1

Hi,

need help to read elasticity value in Physics in materials

Here is what I managed to find so far:

import bge
from bge import logic
from mathutils import Vector

import bpy

D = bpy.data

cont = logic.getCurrentController()
own = cont.owner

Name = own.name

print(D.objects[Name].material_slots[0].material)

mat = D.objects[Name].material_slots[0].material

I need something like mat.elasticity or something just to read the value …

please help!