I think you are right - I tried the same code, but using a different extension of Shape3D as the object to be interacted with, and that works fine.
Many thanks to everyone who helped out! Cheers, Matt -----Original Message----- From: Karsten Fries [mailto:[EMAIL PROTECTED]] Sent: 01 February 2002 14:47 To: [EMAIL PROTECTED] Subject: Re: [JAVA3D] Problems with Behavior Hi Matt, i think - in general - your not supposed to extend the Shape3D class the way you did. I can imagine that this causes the problem, also because the rest looks o.k. Cheers, Karsten Matt Holland wrote: > I'm having some trouble with a very simple app: I have a couple of > shapes on the screen and need to change the colour of one of them by > clicking on it with the mouse. Unfortunately I keep getting a > CapabilityNotSetException:Exception occurred during Behavior > execution:javax.media.j3d.CapabilityNotSetException: Shape3D: no > capability to get appearanceat > javax.media.j3d.Shape3D.getAppearance(Shape3D.java:430)at > ids.java3d.HatColourBehavior.updateScene(HatColourBehavior.java:55)at > com.sun.j3d.utils.picking.behaviors.PickMouseBehavior.processStimulus(PickMo useBehavior.java:153)at > javax.media.j3d.BehaviorScheduler.doWork(BehaviorScheduler.java:167)at > javax.media.j3d.J3dThread.run(J3dThread.java:256)The failure occurs > when trying to execite the getAppearance() method. The thing is, as > far as I know, I *have* set the capability. The code I'm using to > create the object is:MagicHat hat = new MagicHat(); > hat.setPickable(true); > hat.setCapability(Node.ENABLE_PICK_REPORTING); > hat.setCapability(Shape3D.ALLOW_APPEARANCE_WRITE); > hat.setCapability(Shape3D.ALLOW_APPEARANCE_READ);I even went into the > MagicHat class (which extends Shape3D and consists of two Cylinders) > and set ENABLE_APPEARANCE_MODIFY on the two Cylinders.Any ideas what > I'm doing wrong? Am I missing something really obvious?Thanks,Matt =========================================================================== 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".