2

How can I reference an object in POVRay? I mean I want to rotate another object on axis X by another object's rotation value of its Z axis.

I am thinking about someting like this (this of course does not work, just to show you what I mean):

// lets say before I #declared two objects named ObjA & ObjB
Object {
    ObjA
    rotate <ObjB.rotation.z, 0, 0>
}

Any suggestions, please?

Halvor Holsten Strand
  • 19,829
  • 17
  • 83
  • 99
errerr
  • 63
  • 8

1 Answers1

0

Keep the objects synchronized through a variable, e.g.:

#declare Rotation = <5, 3, 4>;

Object  {
    ObjB
    rotate Rotation
}

Object  {
    ObjA
    rotate <Rotation.x, 0, 0>
}

Note that if you change (re-declare) Rotation later, you will need to update the objects' rotation manually by using the vrotate() built-in function.

Vadim Landa
  • 2,784
  • 5
  • 23
  • 33