Game Development Community

RigidShape shadow

by Howard Dortch · in Torque Game Engine · 09/28/2005 (1:56 pm) · 5 replies

I'm using the rigidshape resource and have a rock that rolls down the hill. it's 2 times the size of a man (12 feet) and it cast no shadow. Since it is derived from vehicle why can't I get a shadow?

#1
10/02/2005 (3:12 pm)
The rigid shape resource is derived from ShapeBase, have you tried the original code without deriving from vehicle?
#2
10/02/2005 (4:35 pm)
I made no changes to the resource. He mentions the derivation in the text. I might mention this is inside an interior. There is a static light overhead.
#3
10/04/2005 (3:15 am)
Hi Howard,

Ah, the rigid class isn't derived from the vehicle class - the code was derived from the vehicle code (both descendants of ShapeBase).

The base vehicle class doesn't cast shadows and because the rigid class copied the code it doesn't either, but you can add shadows by adding the following code to the rigid class constructor:

mGenerateShadow = true;

-John
#4
10/04/2005 (6:37 am)
John U duh man!
thanks
#5
10/04/2005 (10:02 pm)
Sure thing! :)