Ask a Question related to Macromedia Director 3D, Design and Development.
-
VonCede #1
Repositioning camera to wanted distance
I have a smal problem what I can't solve myself so I need your smarter guys
help.
I have done a small movie where I have a character and camera. Camera is a
child of character so it follows around when character is moved. Charater
direction can be turned with mouse and camera stays behind the character. If
mouses is moved up or down camera also move up or down and then points to
character with pointAt(pCharacter)
Because I only move camera on it's Y-axis with transale function and then turn
it, camera slowly falls more and more behind of the character.
Now the stupid question: How do I calculate a new camera position so ti stays
in same distance to character? ( I know, I'm stupid.) Or am I doing it all
wrong with camera.translate(0,yAxis), camera.pointAt(pCharacter) then
transalte again towards character method? Is there a better way to make a
camera move like on sphere around desired object?
VonCede Guest
-
blend texture layers relative to camera distance
I have some terrain models with high-res satellite images in texture layer 1. They look great from a distance, but when the camera is close to the... -
snap distance > pick distance impossible?
In the General Preferences, I tried to set the value for the pick distance to 1, and the snap distance to 5, but after several tries (and thinking... -
Snap Distance?
In FH11 for Windows, I am unable to change the snap distance in Preferences. Suggestions? Thanks. Phil -
Repositioning a Column
How do I reposition a column through SQL (Without using enterprice manager). In a table I have a column ServiceID at column number 5, How do I... -
hondo3000 #2
Re: Repositioning camera to wanted distance
if you only turn the camera on the y-axix it will stay where it is and will
stay relative to it's parent.
yourcamera.transform.rotation=yourvector
or
yourcamera.rotate(yourvector)
what are you doing that makes your camera left behind the charakter? can you
post the code that makes it rotate?
cheers!
hondo3000 Guest
-
VonCede #3
Re: Repositioning camera to wanted distance
[Q]if you only turn the camera on the y-axix it will stay where it is and will
stay relative to it's parent.[/Q]
I don't want to just turn camera. I want to turn camera so charater stays
always in middle of the FOV.
if the RightmouseDown then
dMouse = (pMouse - the mouseLoc) / 100.0
dx = dMouse.locV * pMouseSensitivity
dz = dMouse.locH * pMouseSensitivity
-- rotate character as mouse was moved on sideways.
-- Camera will follow it as it is character's child
pCharacter.rotate(0,0,dz)
-- Move camera up/down behind the character
pSprite.camera.translate(0,dx,0)
-- Make camera point back to character
pSprite.camera.pointAt(pCharacter.transform.positi on,vector(0,0,90))
-- Make sure that camera stays in same distance to character. ( ie. dist =
100)
-- ???
pMouse = the mouseLoc
end if
VonCede Guest
-
VonCede #4
Re: Repositioning camera to wanted distance
[Q]Quote:
if you only turn the camera on the y-axix it will stay where it is and will
stay relative to it's parent.
I don't want to just turn camera. I want to turn camera so charater stays
always in middle of the FOV.[/Q]
/me bang's his head on the keyboard.
You were right. Like I said, I'm a bit stupid. Or a slow on today.
member(whichCastmember).node(whichNode).rotate(rot ationVector {, relativeTo})
will do a trick. I case anyone else ever wonders this same problem. (yeah
right)
/me hides back in dark corner in shame.
VonCede Guest



Reply With Quote

