[Closed] Sound plugin : knowing where is the current view
Hello,
I am just making a plugin to manage differents sources of sound in a scene. I have already drawing a 3d object representing a sound. I am also using the FMOD library to play sound.
The object representing the sound is like that : clik here
When the current camera enter in the object (enter into the sphere) the sound need to be listened, else the sound is not listened.
My question is : How can i know if the current camera/view is inside a sphere? How kind of event can i use to know if the camera is moving or not and getting the position of the camera/view?
Scuse me if it is questions of newbies.
Scuse me for my english.
Thx a lot if you answer.
Look up activeViewport in the maxscript help file, and you can get the current viewport / get current camera / current position… etc. I would suggest forcing use of a camera just to make things easier. You can then test the distance between the camera and your sound object using some basic math functions in max. For example,
distance $camera.pos $soundobject.pos
That’s under Point3 Values
Good luck!