Ask a Question related to Macromedia Director 3D, Design and Development.
-
foq #1
Make camera zoom and rotate around object
This has been asked before - and not answered. So..
"Is there any easy way to duplicate the sort of camera rotation found in
Director's 3D preview window? -That is, where horizontal mouse movement rotates
the camera around the world's Y axis and vertical movement rotates around a Z
axis that's relative to the camera (or something... eh, like longitude and
latitude lines on a globe)."
I am trying to make a model visualizer, and the orbit camera and rotate
objects behaviours are not very convincing...
Thank you very much for any help.
foq Guest
-
rotate object
Is there anyway to rotate an object around another object's pivot? -
constraining the rotate axes of the camera
Hi there all, I am tring to make a 3d world that allows the user to rotate with their mouse. Now following the instructions from the post that I... -
rotate camera along an axis
hi i want to change only the X axis in the rotation properties of a camera .how can i do this. can anyone help me. thanking you all in advance... -
Camera Rotate - Help!
Yay! I've no trouble with just rotating the camera with the keys, but how could I do it with the mouse, just like in every FPS, like Half-Life. ... -
How do I rotate an object?
I've cut out an object with the Lasso tool and want to paste it into another photo, but I would also like to rotate the object. Not sure how to do... -
otterman #2
Re: Make camera zoom and rotate around object
Heres some code I hacked out to control horizontal rotation. Will give you an
idea at least
Hope it helps
on mousewithin me
--the middle of the image
myImageMiddle = sprite(me.spriteNum).width/2
myImageLength = the mouseH - sprite(me.spriteNum).left
if the mouseDown then
tempDist = (sprite(5).camera.worldPosition).magnitude
if tempDist > 500.00 then --crop tempDist to max
tempDist = 500.00-- this is max distance to consider
end if
tempFactor = tempDist / 500.00--calculate scaling factor
tempX = (the mouseH-prevMouseH)*tempFactor*2--edit 2 to alter speed
-- THIS BIT TO TELL WHERE TO PIVOT
sprite(5).camera.rotate(0,tempX,0,#WORLD)
end if
prevMouseH = the mouseH
end
otterman Guest
-
necromanthus #3
Re: Make camera zoom and rotate around object
[q]Originally posted by: ]foq
"Is there any easy way to duplicate the sort of camera rotation found in
Director's 3D preview window? -That is, where horizontal mouse movement rotates
the camera around the world's Y axis and vertical movement rotates around a Z
axis that's relative to the camera (or something... eh, like longitude and
latitude lines on a globe)."
I am trying to make a model visualizer, and the orbit camera and rotate
objects behaviours are not very convincing...[/q]
Study this example:
[url]http://necromanthus.com/Games/ShockWave/tutorials/PanCamera.html[/url]
For "Zoom In / Zoom Out" just translate the camera on its "X" axis.
cheers
necromanthus Guest
-
foq #4
Re: Make camera zoom and rotate around object
Thank you both for your ideas. Otterman, I will check out your code later.
Necromanthus, Iīll take a look at it as well, although in your example the
camera is rotating around its own axis. Plus, isnīt FOV a better way to make
zoom? By translating the camera, one could pass through the object being
visualized...
Again, thank you so much.
Best.
foq Guest
-
necromanthus #5
Re: Make camera zoom and rotate around object
[q]Originally posted by: foq
Necromanthus, Iīll take a look at it as well, although in your example the
camera is rotating around its own axis.[/q]
There're 2 starting options. Use the second one (Targeted)
[q]Originally posted by: foq
Plus, isnīt FOV a better way to make zoom? By translating the camera, one
could pass through the object being visualized...[/q]
It's an option (but probably is not the best one).
You should try them both to see the visual result.
After that ... it's up to you.
necromanthus Guest
-
foq #6
Re: Make camera zoom and rotate around object
Oops. sorry for that.. there IS a target mode... I just realized that one second after re-visiting your site.
It looks great, by the way. Should be just what I need.
Thank you very much.
foq Guest
-
necromanthus #7
Re: Make camera zoom and rotate around object
[q]Originally posted by: foq
Oops. sorry for that.. there IS a target mode... I just realized that one
second after re-visiting your site.
It looks great, by the way. Should be just what I need.
Thank you very much.[/q]
There is something more:
Q = Zoom In and A = Zoom Out
have fun
necromanthus Guest
-
foq #8
Re: Make camera zoom and rotate around object
I coulndīt find the Zoom In and Out youīre talking about, but managed to get it
done using FOV.
(something like:)
pCamera.fieldOfView = pCamera.fieldOfView - dx
I guess thatīs it, for the moment. Thank you so much.
foq Guest



Reply With Quote

