single Behavior for many objects How??

Selman says that if you have a lot of cars with a lot of wheels “create a single Behavior to rotate every car’s wheels” p164 to save resources.

Doesn’t this imply that your transform group will need many parents?? Does anyone know how to have one behavior and apply it to many objects?

Thanx : D

He may be suggesting using your own custom behavior that can modify more than one transform group, instead of the pre-built utility behaviors (which I assume is what you’re think of?).

Kev

3 hings:

  1. Behaviors can be placed everywhere, not necessarily on the parent.

  2. You can add as many behaviors as you want to a single group.

  3. You can make a custom behavior rotating 4 wheels at the same time, or add 4 “wheel behaviors” where you want.

Read sun’s java3d tutorial, chapter 4 i think, it’s definitly not bad.