Hi Michael,

    You may see the Cube jitters if two separate behaviors
is used to change the camera and another behavior get
back the camera position and setting the cube's position.
The is due to the ordering of behaviors is not gaurantee
in v1.2.1 and the time interval from frames to frames
varies (see public summary of bug 4332793).
To workaround this, use a single behavior to modify
cube transform first, follow by the camera transform
in a single processStimulus().

   In v1.3, there is a new API

  public void setSchedulingInterval(int schedulingInterval)

to fix this problem by setting the schedulingInterval
of cube's behaviors lower than that of camera's behavior
to gaurantee cube's cube's behavior's always run
first so that there is no jitter.

- Kelvin
-------------
Java 3D Team
Sun Microsystems Inc.

>X-Unix-From: [EMAIL PROTECTED]  Mon Aug 20 23:01:45 2001
>Delivered-To: [EMAIL PROTECTED]
>MIME-Version: 1.0
>Content-Transfer-Encoding: 7bit
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
>Date: Mon, 20 Aug 2001 23:02:53 -0700
>From: "Michael P. McCutcheon" <[EMAIL PROTECTED]>
>Subject: [JAVA3D] moving camera to follow object?
>To: [EMAIL PROTECTED]
>
>I'm trying to figure out what is the best way to move the camera so that it
>"follows" the cube I have that is flying though space.  By follow, I don't
>mean just look at, but follow in the sence that it is like a chase plane.
>(I've already figured out how to "point" the camera to my object using
>lookAt method).
>
>I see two possible ways to do this, but don't know what is best.
>
>1) since the camera is contained within a TransformGroup, just get the
>coords of the cube and use an offset and place the camera near the object
>every frame.
>
>2) do something with the branchgroups...moving the camera into another
>branchgroup so that it automatically follows the cube.
>
>Which of these approaches is better?
>
>It seems like you have to define a bunch of BranchGroups for 2 to work
>properly...I keep getting these exceptions having to do with access:
>
>javax.media.j3d.RestrictedAccessException: Cannot get the parent of a live
>or compiled node
>
>Anyway, 1 seems simple, but 2 seems like it could be better for some reason.
>
>Any thoughts?
>
>Mike
>
>p.s. I'm just learning Java3D.
>
>===========================================================================
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff JAVA3D-INTEREST".  For general help, send email to
>[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to