We still have some question to enhance our plugin: - do you know if there's a listener on observer's position in 2D view when we use the 3D virtual visit? We would get X,Y position only if observer has moved. - where can we find the SVG file of the observer in 2D view?
France
Joined: Nov 7, 2005
Post Count: 9426
Status:
Offline
Re: ScratchHome2 - need some help
You'll need two listeners: - a first property change listener on home instance to follow the changes of camera (the property name is simply CAMERA) - if the new camera is an instance of ObserverCamera (the class used for the virtual visitor), add a property change listener on the camera to follow the properties X Y Z. Don't forget to remove the first listener when not needed to avoid memory leaks.
There's no SVG file for the virtual visitor. Its drawing is hard coded in PlanComponent class.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
Joined: Jul 27, 2012
Post Count: 30
Status:
Offline
Re: ScratchHome2 - need some help
Breaking news !!! Thanks for your help, Kamal worked on plugin and succeeded! Here are videos: - First tests of feedback from the character's position in the virtual tour of SweetHome3D to Scratch. https://mediacad.ac-nantes.fr/m/20571
- First tests of event feedback in the virtual tour, by clicking on an object to collect it in a Scratch sensor. https://mediacad.ac-nantes.fr/m/20572
Joined: Jul 27, 2012
Post Count: 30
Status:
Offline
Re: ScratchHome2 - need some help
Hello everyone, I need an expert in SH3D . In the plugin we did add a listener on the camera (as explained before), everything seems ok but randomly the virtual tour is jerky, very slow. I had a quick look but I think that a trained eye will find the problem faster than me : https://github.com/kimokipo/ScratchHome2.0/tr...oject/src/com/ScratchHome Without doing anything in SH3D, activating the virtual tour makes it buggy, sometimes by generating the sb3 file then launching the communication server it works fine. So we don't have too many clues to diagnose the problem. Thank you for giving us your opinion, we hope to have a finished release during the holidays so that at the beginning of the school year the teachers can use it (the feedback is already very enthusiastic, thank you for this beautiful software that is SH3D).
Joined: Jul 27, 2012
Post Count: 30
Status:
Offline
Re: ScratchHome2 - need some help
All files are in the Github repo, and documentation in Wiki if needed. To reproduce: - launch SH3D (plugin installed) - launch 3D view -> virtual tour And it's buggy.
But if you continue: - generate sb3 file - launch ScratchOffline - open sb3 file - launch extension from ScratchOffline - move in SH3D virtual view and then it resolves pb.
Italy
Joined: Nov 17, 2021
Post Count: 466
Status:
Offline
Re: ScratchHome2 - need some help
I haven't tested it yet, however I think the problem is due to the ScratchListener.runnable field initialized with true. This causes the camera position listener to try to open a huge number of connections which fails since the server isn't running, and I suspect there is a connect timeout which slows down the program.