TSMaterial / Physical Material for TS Colliders


Hey All - Need to have some bounce on some TSSphereColliders, and I see that there is a slot on TSSphereCollider for a TSMaterial, but no way (that I could find) to create one in the editor. So I used the following bit of code to create and apply one on object start:
void Start () {
	//tryng to add a TSMaterial - can't instantiate in editor, so doing so here.
	TSMaterial _physMat = new TSMaterial ();
	TSSphereCollider _coll = gameObject.GetComponent<TSSphereCollider> ();
	_physMat.restitution = 1;
	_coll.tsMaterial = _physMat;
Unfortunately, when I've tested this, I've seen no difference in behavior, and when I look at the gameObject in the inspector during playtest, I see that the slot for TSMaterial on the TSSphereCollider is still empty, even after the above code has run.

Any thoughts on how I could make this work?



  • Scratch that - found it in one of the demos. In case anyone else is looking, you have to add a TSMaterial as a component to the same gameObject that the TSCollider is on, then drag that component into the "TSMaterial" slot on the TSCollider.
  • i just tested this but my player doesn't collide with the other to test the bounce XD do you know anything about this?
  • Hi @o0heza0o, did you try out litke TML?
  • yeah, doesn't work :/