Access Motor speed and torque in script

General discussion about the R.U.B.E editor
Post Reply
StuartTresadern
Posts: 7
Joined: Sat Jan 18, 2014 7:19 pm

Access Motor speed and torque in script

Post by StuartTresadern »

In version 1.5.3 I can not find a function to get Motor Speed and Max Motor Torque. Any ideas ?

I am near to completing an exporter for AGK using script to create the data in a format that makes it easy to import.

Also in the help documentation the getType() function for joints lists all the joints as type 1.

Thanks

Stuart
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: Access Motor speed and torque in script

Post by iforce2d »

Hi Stuart

You are quite correct, these are not present in script at the moment. In the initial release, exposing what is practically the entire Box2D API via script was an overwhelming task, so I have been adding things bit by bit since then. I think most things are there now, but the lesser used ones have still slipped through the cracks. I'll get those added in the next couple of days. Let me know if you come across any other things you need.

About getType(), looks like I had forgotten to fill in the numbers... they are simply in sequence from 0 onwards. Thanks for the heads-up! :)
StuartTresadern
Posts: 7
Joined: Sat Jan 18, 2014 7:19 pm

Re: Access Motor speed and torque in script

Post by StuartTresadern »

Another addition to the script if possible.

Joint.getCollideConnected()

Thanks

Stuart
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: Access Motor speed and torque in script

Post by iforce2d »

These have been added in v1.5.4
Thanks for the feedback! :)
Post Reply