SOLVED Reading current speed in a plugin

Discussion in 'Plugins' started by zmitya, May 11, 2018.

Tags:
  1. zmitya

    zmitya Registered

    Joined:
    Jun 29, 2011
    Messages:
    104
    Likes Received:
    16
    Hi Gents,

    Maybe I missed something, but I can't see the current speed of the car in the InternalsPlugin.hpp.
    How can I get it ?

    Thanks,
    Mitya
     
  2. zmitya

    zmitya Registered

    Joined:
    Jun 29, 2011
    Messages:
    104
    Likes Received:
    16
    This seems to be working:

    double curspeed = -1 * info.mLocalVel.z * 3.6;
     
  3. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,386
    Likes Received:
    6,602
    The example plugin calculates speed already. So just copy what it does.

    .z is close, but it's only your forward motion.
     
    zmitya likes this.

Share This Page