Print at Dec 18, 2025, 11:19:58 AM View all posts in this thread on one page
Posted by supseb at Jun 27, 2022, 10:54:24 AM
ScratchHome2 - need some help
Hi,
as we were working on the new version of ScratchHome, and also extending basic features, you can see our first video demo:
https://www.linkedin.com/posts/kamal-hammi-11...medium=member_desktop_web

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?

Thanks!

Posted by Puybaret at Jun 27, 2022, 6:40:05 PM
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

Posted by supseb at Jun 30, 2022, 5:56:02 PM
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

Posted by supseb at Jun 30, 2022, 6:14:00 PM
Re: ScratchHome2 - need some help
Download : https://github.com/kimokipo/ScratchHome2.0

Posted by supseb at Aug 2, 2022, 1:17:53 PM
Re: ScratchHome2 - need some help
Hello everyone,
I need an expert in SH3D biggrin . 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 wink : 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).

Posted by Daniels118 at Aug 3, 2022, 5:46:48 PM
Re: ScratchHome2 - need some help
Can you provide all the files and steps required to reproduce the problem?

Posted by supseb at Aug 3, 2022, 6:56:54 PM
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.

Thanks a lot for helping!

Posted by Daniels118 at Aug 3, 2022, 9:13:51 PM
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.

Posted by supseb at Aug 7, 2022, 6:33:35 PM
Re: ScratchHome2 - need some help
Many thanks! Problem seems solved.
You can see video demo: https://mediacad.ac-nantes.fr/m/20695