CGA Rule Help

1575
2
Jump to solution
03-21-2016 12:42 PM
deleted-user-OlpHy1NoMNug
Occasional Contributor II


I'm trying to add the ability to rotate the vehicles after they're loaded.  Obviously my CGA knowledge is limited and everything I've tried doesn't do anything.  Any thoughts?

import LumenRT: "/LumenRT/rules/ImmersiveNature.cga"

RandomCar-->

  LumenRT.Vehicle(LumenRT.GetRandomCar)

Scott

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
LR
by
Regular Contributor

Writing this blind so it might not work, but I'm pretty sure it should:

@Range(0,360)

attr r_y = 0

RandomCar -->

  rotate(abs, object, 0,r_y, 0)

  center(xz)

  LumenRT.Vehicle(LumenRT.GetRandomCar)

(Who removed the code formatting option? )

View solution in original post

2 Replies
LR
by
Regular Contributor

Writing this blind so it might not work, but I'm pretty sure it should:

@Range(0,360)

attr r_y = 0

RandomCar -->

  rotate(abs, object, 0,r_y, 0)

  center(xz)

  LumenRT.Vehicle(LumenRT.GetRandomCar)

(Who removed the code formatting option? )

deleted-user-OlpHy1NoMNug
Occasional Contributor II

That did it.  Thank you.

Scott

0 Kudos