We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › Re: How can I combine 2D&3D
Page Index Toggle Pages: 1
Re: How can I combine 2D&3D? (Read 1278 times)
Re: How can I combine 2D&3D?
Jun 19th, 2009, 8:41am
 
Place bfly.display() inside the if statement. Outside, and it will always draw.

If you meant that the mousePressed() method does not work, make sure to use a lower case 'm'.
Re: How can I combine 2D&3D?
Reply #1 - Jun 19th, 2009, 9:49am
 
thank you !

but it still doesn't work.

I think problem is position of background().......I think,,,,,,
Cry
Re: How can I combine 2D&3D?
Reply #2 - Jun 19th, 2009, 11:32am
 
I guess I don't really understand the problem.
When I run it, there is a set of polygons fluttering around...

Is there something else it is supposed to do?
Re: How can I combine 2D&3D?
Reply #3 - Jun 19th, 2009, 12:24pm
 
The first statement in Butterfly.display() is background(0,0,0); which will blot out everything (including the ellipse you mighthave drawn at the mouse position) that was drawn before it.

Move the background() call to the start of draw(), supposing you want to start with a blank display for each frame.

-spxl
Page Index Toggle Pages: 1