SketchUcation Plugin Store

 

 

SketchyPhysics3.2 (Dec 2)

Moderator: CPhillips

Re: SketchyPhysics3.2 (Dec 2)

Postby Oxer » Fri Jan 27, 2012 5:13 pm

bouleaux wrote:Hello Oxer, many thanks
I tried to find the 3.1 version, but it doesn't seem to be available for download anymore (on this page : http://code.google.com/p/sketchyphysics/downloads/list)
Do you know of another place to find it ?
Thank again for your answer

If you want i can send it you by PM
"The result is the end what is important is the process" by Oxer
http://www.oxervision.blogspot.com/
User avatar
Oxer
 
Posts: 158
Joined: Thu Sep 10, 2009 1:13 am
Location: Benavente, Spain
Name: Oscar
Operating system: Mac
SketchUp version: 8
License type: Pro
SketchUp use: illustration, cartoons
Level of SketchUp: Advanced

Need Help on keyboard controls

Postby Alainbo » Sun Apr 29, 2012 6:35 pm

Hi,

I tried to add kaybord control on my physified lynx crane but I cannot get it working properly.
It actually works with sliders so, the joint position is given by the slider position so the crane's arm, for example stays in the position set by the slider.

With keybord control it's different and even if I can move the arm with a key, it cannot stay in position when I release the key.

original joints where servo. I tried to use a motor instead but the result is almost the same.

Any idea?
Please, register (free) to access all the attachments on the forums.
Alainbo
 
Posts: 57
Joined: Sat Apr 24, 2010 8:51 am
Name: Alain bonnefoy
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Intermediate

Re: SketchyPhysics3.2 (Dec 2)

Postby ashscott » Mon Apr 30, 2012 7:53 am

Here is the answer to your question from this thread: http://forums.sketchucation.com/viewtopic.php?f=61&t=44399

There is a much better answer than using a motor to place a joint where you want it - you need to use a servo and a little ruby script

Step1: place your servo within the group you want to move and attach it to a base group
Step2: select the servo and open the sketchyphysics UI
Step3: within the UI apply the following settings
    min:0
    max:1
    accel:4000
    damp:1000
    controller:@servo1 (you can actually call it anything starting with @
Step4: Select the base of your model and open the sketchyphysics UI
Step5: place the following rubyscript in there:

Code: Select all
    if frame<1.00
    @servo1=0.00
    end
    # this allows servo to incrementally increase based on joystick input (righty) you can change it to any of the joystick axes
    @servo1+=(0.5-righty)
    # this sets range of movement for the servo as it is not set in the servo's UI
    if @servo1>45;@servo1=45;end
    if @servo1<-45;@servo1=-45;end



It took me a long time to work this out (reverse engineering another model) so I am more than happy to help anyone out with it if these instructions are too hard to follow.

I believe this is a very powerful function in sketchyphysics and I have only seen it in one model in the 3DWH
Google Certified Geo-Developer
User avatar
ashscott
Premium Member
Premium Member
 
Posts: 165
Joined: Sun Apr 26, 2009 11:20 pm
Location: New Zealand
Name: Ash Scott
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: engineering and mechanical design
Level of SketchUp: Intermediate

Re: SketchyPhysics3.2 (Dec 2)

Postby Alainbo » Mon Apr 30, 2012 2:08 pm

Hi Ashscott,
Thanks for your answer.

I tried your script and one I wrote and in any case I get the following error when I start the simulation:

--------------
Error starting the simulation: Error in Script:

...

undefined method'<' for nil:NilClass
C:/Program......../ControllerCommands.rb:1314:in 'initEvents'

--------------

It something is not correctly initialized. Is there something to import at the beginning of the script or something like that?

Any idea?

Is there any wiki on the basics of keyboard control? The only one I know is http://sketchyphysics.wikia.com/wiki/Ruby.
Alainbo
 
Posts: 57
Joined: Sat Apr 24, 2010 8:51 am
Name: Alain bonnefoy
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Intermediate

Re: SketchyPhysics3.2 (Dec 2)

Postby ashscott » Fri May 04, 2012 11:26 am

You need to make sure that the name of your servo in the controller box (select the servo and press the 'UI' button) is the same name used in the script - in the example I have used the name '@servo1'

It looks like it is spazzing out because you haven't got a name right somewhere......
Google Certified Geo-Developer
User avatar
ashscott
Premium Member
Premium Member
 
Posts: 165
Joined: Sun Apr 26, 2009 11:20 pm
Location: New Zealand
Name: Ash Scott
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: engineering and mechanical design
Level of SketchUp: Intermediate

Re: SketchyPhysics3.2 (Dec 2)

Postby Alainbo » Sun May 06, 2012 5:50 pm

Hi Ashscott
I didn't really take time to verify but I diectly entered the script like that in the "scripted" field. I think it's the problem because no method is known.
In the "On Tick" field, no problem.
I think a method, like onTick{ ...} for example, should be created.
Alain
Alainbo
 
Posts: 57
Joined: Sat Apr 24, 2010 8:51 am
Name: Alain bonnefoy
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Intermediate

Re: Again ??!!??

Postby emerald15 » Wed May 09, 2012 3:24 pm

Alainbo wrote:There are months now that sketchyphysics 3.2 installs 3.1 !!!

Don't understand this update !?


Hmm... same thing here. I started out with 3.2 but it seemed a bit un-stable (might have been my fault - still learning). I reinstalled 3.2 but at the install wizard point it suddenly reverted 3.1. This then seemed to case more conflict & SP randomly worked or crashed. I'm also using windows 7 (x64) & SU8 - could it be this combi won't load SP3.2?

Solution for the moment is running SP3 instead - but no sound effects.

NB. has anyone actully produced an SP movie with sound effects - I haven't seen one yet.
User avatar
emerald15
 
Posts: 119
Joined: Thu Apr 28, 2011 10:51 am
Location: Cambridgeshire, UK
Name: Fiona Collins
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: interior design
Level of SketchUp: Intermediate

Re: SketchyPhysics3.2 (Dec 2)

Postby emerald15 » Thu May 31, 2012 4:42 pm

Don't know if anyone can suggest a solution here... I was getting to know sketchyphysics (although it sees a bit temperamental, not always running as it should. I'd produced a few animations (domino falls, etc.) Now it crashes as soon as I hit SP play. I've re-installed 3.1 & again onto a second PC - but still the play button crashed SU. Any ieas?... is there somehting I need to set in SU preferences maybe?
User avatar
emerald15
 
Posts: 119
Joined: Thu Apr 28, 2011 10:51 am
Location: Cambridgeshire, UK
Name: Fiona Collins
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: interior design
Level of SketchUp: Intermediate

Re: SketchyPhysics3.2 (Dec 2)

Postby ashscott » Fri Jun 01, 2012 8:23 am

Try making a simple SP file from scratch - sounds like there might be something in your file that is causing issues if you have been trying to open the same file - I get that often when I have made errors in SU models or ruby script before and it takes a while to work out what it is by elimination but I don't know a better way to do it
Google Certified Geo-Developer
User avatar
ashscott
Premium Member
Premium Member
 
Posts: 165
Joined: Sun Apr 26, 2009 11:20 pm
Location: New Zealand
Name: Ash Scott
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: engineering and mechanical design
Level of SketchUp: Intermediate

Re: SketchyPhysics3.2 (Dec 2)

Postby emerald15 » Wed Jun 06, 2012 3:11 pm

ashscott wrote:Try making a simple SP file from scratch - sounds like there might be something in your file that is causing issues if you have been trying to open the same file -


You're right - starting with a clean file cleared the fault. It seems there's a conflict between version 3.1 & 3.2. I started working with 3.2 & have some files created with that version. Then having had a problem, I went to re-install & could only access v3.1, so have continued using this version. If I open an existing file that was not originally created in 3.1... the programme crashes (to be expected I suppose - but it then continues to crash with files of either versions). Your suggestion has given me a way to clear the problem. Ideally, I'd like to re-install 3.2 & keep to it - but can't seem to access it now. Anyone know where its's gone?
User avatar
emerald15
 
Posts: 119
Joined: Thu Apr 28, 2011 10:51 am
Location: Cambridgeshire, UK
Name: Fiona Collins
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: interior design
Level of SketchUp: Intermediate

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago

Keyframe Animation plugin - animate your SketchUp model by adding movement to any object.

Premium Members get 20% discount!

Ad Machine
Robot
 
Posts: 2012

Previous

Return to SketchyPhysics

cron

Who is online

Users browsing this forum: No registered users and 2 guests