Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Animated models shadows


Frenchgui

Recommended Posts

I have something similar on the converted DA game.

 

Idle animation doesn't animate shadow, but if character is moving it animates.

Does pointlight have some sort of movement tracking so shadows become static if entity isn't moving?

Link to post

Yes, you're right shadmar!!! As my scene is quite empty (it was just for learning animations), so nothing uses physics. As soon as I've put some boxes (in unstable position) shadows are working fine. As soon as everything is on floor and idle, shadows stop updating. I will try using a physic camera to force shadow update. Thanks!!!

 

edit: Ok I've tried it, but character physic doesn't update physics save if they collide. So I have to find a trick, or maybe Josh can add an option to enable/disable update shadows continuesly.

Link to post

Hello Josh. To see the shadow trouble, just put a floor, a point light and the crawler model with this script:

 

Script.Speed=1.0--float

Script.Sequence=2--int

entpos = Vec3(0,0,0)

Script.angle=50.0--float

 

function Script:Draw()

-- move entity a bit for shadow updating

self.angle = self.angle + 1.0

if self.angle >= 360 then

self.angle=0

end

entpos = self.entity:GetPosition()

entpos.x = entpos.x + Math:Sin(self.angle)/100

entpos.z = entpos.z + Math:Cos(self.angle)/100 + 0.001

self.entity:SetPosition(entpos.x , entpos.y , entpos.z)

 

local t = Time:GetCurrent()

self.entity:SetAnimationFrame(t/100.0*self.Speed,1,self.Sequence)

end

 

... and a camera. As you can see, model is animating and moving, but not shadows.

Link to post
Guest
This topic is now closed to further replies.
Facebook Twitter Youtube Github Steam
×
×
  • Create New...