At 12:50 PM -0400 9/21/05, Lars Jensen wrote:
> To recap: move the ball, not the camera, and set the camera position using
mSphere.ObjectToWorldTransform.
But he wants the ball to appear to roll. If he uses Pitch to do that, won't
it screw up ObjectToWorldTransform, and any Yawing he does subsequently to
change heading?
Aha, good point.
I would think that the simplest way to get the effect he wants -- which I
interpret as a "follow me" view of a rolling ball -- is in each frame, to
reset the ball's orientation, Yaw it to agree with the ball's current
heading, set the camera position from the ball's resulting orientation, and
then Pitch the ball some amount. The heading and Pitch from the last frame
would be remembered and the new values would be deltas on that.
Another way would be to put the ball inside a Group3D. Move the ball
forward by moving the group; turn it by yawing the group. Make it
roll by pitching the ball, not the group; and get the camera position
by calling ObjectToWorldTransform on the group, not the ball.
Best,
- Joe
--
Joe Strout REAL Software, Inc.
Vote for REALbasic (twice!) in the LinuxWorld Reader's Choice Awards:
http://linux.sys-con.com/general/readerschoice.htm
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|