View Single Post
  #1  
Old 05-04-2010, 10:43 AM
shahramy shahramy is offline
Member
 
Join Date: Dec 2009
Posts: 41
Unhappy how to change shadow direction?

i used Shadow module to create shadow but I cant change the direction of shadow in the other hand the point in which the imaginary light source exists. i have used this code.

SHADOW_RES = 2048
#Postion of shadow projector
SHADOW_POS = [-30.800,5.000,50 ]
SHADOW_AREA = [150,150]

#Create shadow projector
shadow = Shadow.ShadowProjector(size=SHADOW_RES,pos=SHADOW_ POS,area=SHADOW_AREA)

#Add avatar as a shadow caster
shadow.addCaster(obj1)
shadow.addCaster(obj2)

#Add ground as shadow receiver
shadow.addReceiver(sh)

with this shadow_pos the shadow will create exact under the two object which have many distance from each other!!!
Reply With Quote