playMaker

Author Topic: Get/set angular velocity?  (Read 2671 times)

megmaltese

  • Sr. Member
  • ****
  • Posts: 351
    • View Profile
Get/set angular velocity?
« on: April 29, 2013, 02:50:45 PM »
I see there are actions to get and set velocity, and I see there is a get speed action.

What about get/set ANGULAR velocity? Is it missing at all?

How to limit the rpm of a wheel without this command?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14213
  • Official Playmaker Support
    • View Profile
Re: Get/set angular velocity?
« Reply #1 on: May 09, 2013, 03:30:58 AM »
Hi,

 On the doc ( as I wanted to create these actions), they don't recommand it. Are you using a wheel collider or jsut a normal physics collider?

with wheels, you can use torque and brake to control the velocity.

Also, I guess what you need is to set the max angular velocity:

http://docs.unity3d.com/Documentation/ScriptReference/Rigidbody-maxAngularVelocity.html


bye,

 Jean

megmaltese

  • Sr. Member
  • ****
  • Posts: 351
    • View Profile
Re: Get/set angular velocity?
« Reply #2 on: May 09, 2013, 06:22:16 AM »
I'm using all physical stuff, can't use wheels.
Tried them but on tanks I should code lots of stuff on them and I honestly can't. At least for now.

Anyway, I mostly need to GET angular velocity, so I can check if the wheel is going crazy and limit the torque I'm adding to it.

And I've made the PM action already, it's quite easy for small commands like these... I've taken the GET VELOCITY and replaced the command with ANGULARVELOCITY eheh  ;D

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14213
  • Official Playmaker Support
    • View Profile
Re: Get/set angular velocity?
« Reply #3 on: May 09, 2013, 11:13:23 PM »
Hi,

cool, Yes, making custom action is easy after all :)

 Not trying to put you off the way you want to do it, but if you are doing a tank track right? If you have, you can use wheels ( wheels are simpyl a special physics based collider), just hide them visually, else, the solution I came up with my excavator is a using configurable joints with a regular cylinder.

http://www.fabrejean.net/projects/excavator/

and the related thread: http://forum.unity3d.com/threads/66871-Excavator-simulation

Bye,

 Jean