View Full Version : 2 really hard questions. need help

12 December 2010, 10:13 PM
I've come up with 2 major problems, and I hope there's a way to solve them without using any scripts. please help me:

I have a camera that spins around an object that is encased by another object
I need to somehow make the only side that facing the camera transparent or cut (don't really care)
without cutting the encased object itself (which is doing his own animations). So of course viewport clipping won't do.
Is there a way to do it?

I need a spotlight to constantly calculate and find the vertex or polygon that is nearest to it and look at it.

Can anyone help?

thanks in advance

12 December 2010, 06:49 AM
One solution to the first question is:
- create a box, such that it intersects with enclosing object
- link it with the camera, so that it also spins (Or animate it like that)
- make a Boolean object of this box with enclosing object (A-B or B-A)
- the cut will spin with the camera

12 December 2010, 12:26 PM
Thank you for the reply.
It did solve my problem
Had to change the pivots so the rotation will be exactly around the the object but overall it works!

Now I only need to solve the other problem...

12 December 2010, 01:25 PM
If you're not afraid to script, look into the closestFace function of the MeshProjIntersect class.
I attached a horibly inefficient example that will probably flood your ram or melt your CPU.

If you really don't wanna script, you might be able to pull it of with particle-flow, but that would probably be even more complicated.

12 December 2010, 01:29 PM
I don't mind to script,
Not so proficient with it though, but I figured this must be the only way

I know that I need somehow to calculate the closest vertex of Object1 from Light1 and then rotate Light1 to look at this vertex.

Thanks for the example, I'll start digging into it

CGTalk Moderation
12 December 2010, 01:29 PM
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.