C4D_Parallax

Category: Objects / Category
Since engine version: 4.9.1.0 GWE

Description

Object category: the object moves parallax with respect to the landscape. This means that the apparent object position changes depending on the scroll position of the viewport. This can be used to have objects apparently moving in the far background or to create status overlays.
Parallax deviation from the normal location is specified in percent and stored in the first two indexed, local variables (see Local) of the object (Local(0) for horizontal, Local(1) for vertical deviation). This means for normal location these two values should be 100. A value of 0 will lock the object to the viewport. For parallax background object use values between 0 and 100. From NET, object positions can also be negative values. Those objects will then be aligned with the right or bottom edge of the screen respectively.

Syntax

int  C4D_Parallax ();

Remark

This value is also defined as a constant. Thus the parameter brackets can be omitted.

Example

SetCategory(GetCategory() | C4D_Parallax() | C4D_Background());
Local()=50; Local(1)=100;
Moves the calling object into the background and adds horizontal parallaxity.
See also: C4D_Background, GetCategory, GetDefinition, SetCategory, SetSkyParallax
Sven2, Juni 2003