- Constraint cameraOrientationConstraint =
- Constraint::New<Quaternion> ( Actor::Property::ORIENTATION,
- Source( mShadowPlane, Actor::Property::WORLD_POSITION ),
- Source( mPointLight, Actor::Property::WORLD_POSITION ),
- Source( mShadowPlane, Actor::Property::WORLD_ORIENTATION ),
- &LookAt );
-
- mCameraActor.ApplyConstraint( cameraOrientationConstraint );
+ 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();