This site requires JavaScript, please enable it in your browser!
Greenfoot back

tombud999's Comments

Back to tombud999's profile

About other path shape, I don't think it can be a universal path shape chooser like you mention. I'll explain more about this CircularMover class. Actually I create this CircularMover class for my DominoFall scenario, to move the LightBulb to be exact (see the DominoFall scenario, click Run then click Clear button and create LightBulbs by holding L key and clicking on empty space). A lay-down lightbulb is basically a lay-down cone that can roll in a circular path. The center point of the circular path is always at a specific distance from the center axis of the cone [method setCR(double CIR_RAD)], so the location of the center point is depends on the rotation angle of the cone when initially put on the ground (compare the two flies above, the center point is always at one grid distance to the right hand (legs, actually :D) of the fly. Back to the LightBulb, to start roll it, I just apply a linear force - addForce(Vector vForce), the vForce vector can be from a toppled domino or a moving ball striking the LightBulb (btw, this interaction is not finish yet in my DominoFall scenario, I still working on the more accurate collision detection - see, my scenario is also not complete!). Whew! I wish I could draw something in this comment area, explaining this kind of things is though with words only :D
Hi, thanks, freeman. Well, I still don't really understand what is the problem, you're right, it is easier to see first. You could just export/publish your scenario in this gallery (with the source), so I can instantly see it running. Don't worry if it is not complete or not working properly, this is a playground to learn java, and by publishing it you got more people to discuss with. If you need it, my email is tombud999@gmail.com.
Now with mjrb4's Wanderer class.
I just modified SmoothMoverWithGravity class to extends Wanderer class, and hey! it works perfectly! :D Thanks alot, Michael !
Hi, I would like to have this Wanderer effect in my Tossing scenario that using SmoothMover & Vector class. Which methods should I override?
Lol ! So we found what confuse us. Hi, Herman, I think you'd better change "rectangles" to "square", right?
Hmm... the gravitation effect is not good enough, I think I had to modify the SmoothMover class. Any suggestions?
Newton is come! :D
Hi, thanks. Hmm... new Ton - Newton? Gravity? :D Yes, I already preparing for a gravitation effects, but first I'm perfecting the tossing codes.