PDA

View Full Version : deflector plane constraint..thingie.


gaggle
11-15-2002, 10:25 AM
Hey all, it's question time.

I'm having some trouble figuring out how to properly constraint an object. The scenario involves balloons colliding. They're handanimated so some form of intersection is hard to avoid as it is. They're also somewhat transparent, which makes said intersection rather unwanted.

So I began pondering that it sure would be nice with a fast little way of making them not intersect. I can get a nice deformation-effect going using Flex, or even a spacewarp FFD, but that's only half of it: I'm having trouble making it an automatic thing that just does its job without me having to hand-animate deflectors or spacewarps.

The Flex approch involves a square ordinary Deflector object, it would have to sit right between both balloons at all times. Right, so I position-constraint it, target the two balloons, and presto, it's now always centered between the two objects. This works great it seems.
But how do I take the rotation of the deflector object into account? It needs to rotate itself in such a way as to have taken the average of both balloons.. ie. if one balloon were at 0 degrees, the other at 90, the deflector would have to be at 45 degrees. And I can't seem to figure out how to do that.. any suggestions.. ideas?.. I've attached an image illustrating my point.

I've gotten close-ish by using a somewhat odd setup involving the balloons, then two planes, each "LookAt" constrained to each balloon, and then finally the deflector object, Orientation Constrained to each plane. There was much flickering when moving the balloons around, the planes kept popping around, rotation wise, ie. as if an Upnode was required. No amount of defining an upnode helped though.

So anyways, if you have any suggestions on this, do yell out. I'm looking for some low-performance simple implementation of this, so keep SimCloth and Reactor suggestions at bay please :rolleyes:

Iain McFadzen
11-15-2002, 10:35 AM
A single Look At constraint pointing at one of the balloons should do it, since the Poistion Constraint will always assure the deflector is directly between them anyway.

gaggle
11-15-2002, 10:51 AM
Hm.

..good lord! You're right. Yes.. Yes of course. So obvious. Thanks Iain for that most valid of comments.

Siigh. I swear, just a few minutes ago I was certain I had tried everything.

Iain McFadzen
11-15-2002, 12:36 PM
Couldn't see the wood for the trees huh? :)

CGTalk Moderation
01-13-2006, 11:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.