Sorry, I'm not great at code snips but here's a slightly codified example to show you sort of how materials are done.
Sorry about any wrong/missing functions, but I'm too lazy to look them up.
I hope this helps to some extent :)
Sorry about any wrong/missing functions, but I'm too lazy to look them up.
;toksim created Const GroundMat = 0 Const BallMat = 1 ;Rough material, probably ground toksim_SetMaterial GroundMat,0.8,0.01 ;Bouncy ball material toksim_SetMaterial BallMat,0.2,0.8 ;make ground Ground = tokab_create() GroundBox = tokab_addbox( Ground,100,2,100 ) tokgeom_setmaterialindex GroundBox,GroundMat ; apply material ;make ball Ball = tokrb_create() tokrb_setposition Ball,10,40,5 BallGeom = tokrb_addsphere( Ball,5 ) tokgeom_setmaterialindex BallGeom,BallMat ;apply material
I hope this helps to some extent :)