- Constraint cameraOrientationConstraint =
- Constraint::New<Quaternion> ( Actor::Property::Rotation,
- Source( mShadowPlane, Actor::Property::WorldPosition ),
- Source( mPointLight, Actor::Property::WorldPosition ),
- Source( mShadowPlane, Actor::Property::WorldRotation ),
- &LookAt );
-
- mCameraActor.ApplyConstraint( cameraOrientationConstraint );
-
- Constraint pointLightPositionConstraint = Constraint::New<Vector3>( Actor::Property::Position, Source( mPointLight, Actor::Property::WorldPosition ), EqualToConstraint() );
+ Constraint cameraOrientationConstraint = Constraint::New<Quaternion> ( mCameraActor, Actor::Property::ORIENTATION, &LookAt );
+ cameraOrientationConstraint.AddSource( Source( mShadowPlane, Actor::Property::WORLD_POSITION ) );
+ cameraOrientationConstraint.AddSource( Source( mPointLight, Actor::Property::WORLD_POSITION ) );
+ cameraOrientationConstraint.AddSource( Source( mShadowPlane, Actor::Property::WORLD_ORIENTATION ) );
+ cameraOrientationConstraint.Apply();