tease tricks 2004-01-23 - By Brian Robbins
Back > What fun, to argue with Barry and Brian!
Bring it on Colin! :)
> I only need do half of 2 from the above. You can make a model that > has no resource, that's what I do.
Guess I never thought of that. That would probably end up making it very similar in performance to a group, but I'd have to do some performance checks to be sure. . . Maybe I will later tonight :)
> As it happens I do set the > position, but I could do that just for the first vane, the enterframe > script would make all the others fall in place. > > How would you use groups to do the connecting I'm doing between just > below the vane above, and just above the current vane?
Well, the short answer is, exactly how you are now. Other than drilling down into a model Resource, and shader, you can treat a group EXACTLY like another model. It still has a transform, a world transform, can have parents, children, etc. In terms of positioning elements in the world, it behaves no differently.
> Would I take > the previous vanes group's position, translate its Y value (in local > coordinates to that group), and set the current vane's group to that > location (read as global coordinates)? That would involve duplicating > transforms, doing translates, and finally setting the position. The > way I do it I only have to set the position of one model per vane. > Isn't that easier?
As I implied above, in this part of the code you shouldn't need to change a single line. You can treat the group exactly like a model except that it has no visible component (ie modelResource, or shader) So, quoting from your previous message:
> The solution to the rotating outside of the model (there's probably an easier solution to this part of the problem, but my solution helps solve then next part too) is to have an invisible parent model and translate the vane away from that (monospaced font used here):
Just change that to "...have a parent group and translate the vane away from that"
> by rotating that the child vane part will swing nicely. That solves the swing vane part, but to solve the connecting to the next vane I made another invisible model that is also a child of the first invisible model:
Would change to "...I made another group that is also a child of the first group:"
> The @ swings along with the vane. Now all that's needed is to set the top invisible model to the location (but not rotation) of the previous vane's bottom invisible model. The whole of this vane is then pushed forwards, or backwards, or up or down, according to what all the previous vanes are doing at the time.
And finally this would change to: "...Now all that's needed is to set the top group to the location (but not rotation) of the previous vane's bottom group..."
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ Dir3d-l mailing list Dir3d-l@(protected) http://nuttybar.drama.uga.edu/mailman/listinfo/dir3d-l
|
|