MSPhysics 1.0.3 (16 October 2017)
-
@sofia oliveira said:
Weβve made a DLL in C# that is able to get data from the IMU (via Bluetooth) and compute a x,y,z position from both accelerometer and gyroscope data. We would like to use this x,y,z coordinates to move a shape inside Sketchcup.
My goal is that Sketchup, with these IMU values, make a movement on an object.
Looks like you're half way done already Can you post a function name you're willing to export from the dll (with parameters and return type), plus the dll itself. We could use Ruby DL to extern function into Ruby and then teleport the desired entity according to the [x,y,z] coordinates.
Open SketchyPhysics in SU6, 7, or 8.
Copy this code into the desired body, the body you want to be moved.
Change path and name to the desired dll path.
Change dll function_name to the desired name.module MyRawInputC extend DL;;Importable dlload('C;/[path]/[dll_name].dll') extern "void func_name(float*)" def self.read_accelerometer_pos buf = (0.chr*12).to_ptr func_name(buf) Geom;;Point3d.new(buf.to_a("F3")) end end unless defined?(MyRawInputC) ontick { teleport(MyRawInputC.read_accelerometer_pos) }
Press play and see if it works.
If you having troubles, upload the dll and show the function name (with params) you want to export and I'll modify the script. -
@unknownuser said:
Do you know that you have also a Physic engine (Bullet) for Sketchup inside Simfonia ?
(free version is existing)hello pilou,
not realy free, only a free trail.
dean
-
How's it coming along?
-
@fred_flintstones said:
How's it coming along?
I currently finished enchanting the MSPhysics Scripting API. As well, I finally finished with the body and simulation dialog.
Tested some cloth, just for fun.
The Newton cloth and soft bodies feature is not complete yet. The collisions, body transformation, stiffness and other deformidable body properties are not done. Bullet physics engine seems a promising option, after all. I might migrate to Bullet, but not after version 1.0.0, or else this will never get finished.
And some custom cloth.
I'm left with joints for this version. I did start integrating Newton joint API, but it seems I did it incorrectly.
-
Well this is really awesome! Testing for some clothes! Thanks a lot!
-
Cloth simulation in SU?
You are on the verge of being a superstar, much anticipation for this feature
-
@solo said:
Cloth simulation in SU?
You are on the verge of being a superstar, much anticipation for this feature
SU is very powerfull for such purpose.
-
Imagine to amount of table cloth, curtains and unmade beds in the 3D warehouse soon.
-
I've been following this thread with quite some amazement. This is so very impressive, keep up the great work!!
-
@anton_s said:
I'm left with joints for this version. I did start integrating Newton joint API, but it seems I did it incorrectly.
Aww that's to bad...But good to see how much you've done... GL with the joints!
-
Just curious about the release date. I certainly don't want to sound like I'm complaining though. Just dying to get my hands on this ASAP. It looks amazing.
-
Missed this advanced one! Cool!
-
Wow.. how could I missed this ?
-
While rewriting SketchyPhysics I learned very important stuff. I have to make some major changes to this project before its released. Sorry
-
No problem Anton. Was just curious about an update.
Thanks for all the work. Putting something this complex out in your spare time can't be easy. I'll keep waiting patiently.
-
@unknownuser said:
not realy free, only a free trail.
You have a free version with 10 seconds animation + limited number of objects!
-
Hey guys,
Just as as an update, I'm changing from depending on FFI to using a C++ extension. I'm pretty sure it will make the code plenty times cleaner, and improve performance roughly 50 times. I also, figured that using sketchup animation for this won't be a good choice, as during animation changing scenes wouldn't work, but via timers changing scenes would work like a charm.
-
Hi. Just to let you know that I am waiting for this plugin to finally create hidden blade from assassins creed B) Which I have wanted already 3 or 4 years
Thank you for your work.
-
Hello Nicat,
I don't know how I missed this post.
MSPhysics will be designed to have a very stable and full-documented API. My initial purpose of writing this plugin was to have a better scripting API. When I was a user of SP, I was very unimpressed with all the bugs in script and all the inconsistencies. It literally took away my motivation from creating games or scripted models in SP. However, the legacy of SketchyPhysics made me urgent to write something like it.
In SketchyPhysics users came across many problems of not being able to create games, such as not being able to use mouse wheel input and mouse clicks in general. Not to mention that keyboard controls were very unstable because if the SP Control Panel got deactivated the controls would start interacting with SU window, which in turn deactivate SP and activates different tools. This was very annoying. MSPhysics, the Windows version, will have a feature to monitor and block these keyboard controls, mouse clicks, and mouse wheel events. Not only you will know when certain keys are pressed, but also you won't need that 'control panel' dialog taking focus.
Even more amazing, for gaming purposes, the Windows version of MSPhysics will have a feature to set SU viewport fullscreen. I.E when simulation starts viewport could be set fullscreen, and when resets, viewport is set back to original placement. This will make gaming in SketchUp a much better experience.
I'm glad you're still waiting to write a game. I will try to do my best in making progress to this project.
Best regards,
Anton -
Very exciting stuff! Hope its getting along well...
Advertisement