Announcement

Collapse
No announcement yet.

Blue man Vehicle Physics Plugin

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Hey guys,

    When I created a C++ class that inherits from VehiclePhysicsActor, and then create a Blueprint out of the C++, everything kinda bugs out. I need my Pawn to be in C++ for some additional functionality.

    This error is wholly reproducible.
    Create C++ class that inherits from VehiclePhysicsActor (Blue Man's vehicle actor) -> Create blueprint from created C++ class -> setup the blueprint according to the tutorial.

    Any ideas?

    Leave a comment:


  • replied
    Hey Blue man, hope you're doing ok!
    So, I've come here because we've been working on car simulations and been using your plugin for generating a playable prototype and we found some issues in your engine simulation math, which prevents the plugin from behaving realistically when using real Torque and Gear values. I've already fixed most of these issues but I just wanted to point them out in case you haven't fixed them yet.

    First of all, regarding the RPM formula you use, while I see where you got that it has an issue. The theoretical formula is this one:

    rpm = wheel rotation rate * gear ratio * differential ratio * 60 / 2 pi


    The important bit is the last "60/2PI" which comes from translating from rad/s to RPM, the transformation is done by multiplying by 60 (seconds in a minute), and then dividing by 2PI (radians in a revolution). The important bit is that the 2PI is one number, so.. app 6.28.

    In the source code you have the following:

    RPM = (RotationRates / DriveWheels.Num()) * FMath::Abs(CurrentGear.GearRatio) * DifferentialRatio * 60 / 2 * PI;


    Which is wrong, because it is effectively using (60/2) * PI Instead of 60/(2PI), this means all RPM calculations are off by PI squared, every engine you use is almost 10 times "FASTER" than real life counterparts. First I was confused due to the existence of the variable RPMMultiplier but I assume it's something that was made to adjust for this issue. BTW for anyone who wishes to fix this using the RPMMultiplier, just set it as 1/(PI*PI), which is roughly 0.1.


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


    The second issue I found, is that when setting up real life Torque values from cars, we found that the simulation was STILL not correct, and the culprit is the way you get the engine drive and engine torque values.

    float EngineTorque = (CurrentGear.GearNumber != 0) ? (TorqueCurve->GetFloatValue(RPM) * 10000.0f) / DriveWheels.Num() : 0.0f;

    You divide the values by the amount of DriveWheels on the car, this is not correct and will result on obtaining wrong engine torque values. In our simulation we got an engine which had HALF the power of its real life counterpart due to having 2 drive wheels. In reality the engine doesn't really care how many wheels are connected to the axis. Removing the DriveWheels.Num() division will return the engine simulation to be somewhat close to what's expected on real life data.



    That is all, hope this helps you... hopefully this can help you if the values haven't yet been fixed or, at the very least, be of some use for people that can't get the plugin to behave realistically when plugin in real life data.

    Cheers!

    Leave a comment:


  • replied
    I'm trying to add "resistance" to the steering wheel in curves at speeds (for Logitech hardware). I hope you know what I mean. The "counterforce" when you are driving and steering.
    Using the steering wheel hardware to act forces on the steering wheel is solved, using the official Logitech plugin.

    But how do I calculate how much force, in what direction (left or right on the physical steering wheel) is to be set?
    Does anyone know how to implement that the right way?
    Which values are available already through this plugin that I could use?
    Did anyone do that with this plugin before?

    /edit/
    (v² * angle) mapped to -100%/+100% force gives a pretty good base for further tweaking. This is good enough for now. More input on this topic is welcome, though
    Last edited by Ben_Cykyria; 01-13-2020, 12:17 PM.

    Leave a comment:


  • replied
    Originally posted by JonDadley View Post
    I'm having trouble making the handbrake on my vehicles wheels effective. Currently, it "works" if the vehicle is moving at an extremely slow speed (say 1 or 2 mph). However, if I'm travelling faster than this, the handbrake seems to have no effect. I've tried increasing the various Handbrake values on the wheels (handbrake multiplier, handbrake grip, handbrake grip limit) but nothing seems to make any different even when set to extreme values. Can anyone suggest any potential issues?
    Hi JonDadley
    I had an issue with that too, I somehow tried to set the Handbrake for each wheel seperately. Maybe the screenshot below helps.
    Click image for larger version

Name:	BlueManVehiclePhysicsHandbrake.jpg
Views:	308
Size:	164.2 KB
ID:	1691552

    Leave a comment:


  • replied
    I'm having trouble making the handbrake on my vehicles wheels effective. Currently, it "works" if the vehicle is moving at an extremely slow speed (say 1 or 2 mph). However, if I'm travelling faster than this, the handbrake seems to have no effect. I've tried increasing the various Handbrake values on the wheels (handbrake multiplier, handbrake grip, handbrake grip limit) but nothing seems to make any different even when set to extreme values. Can anyone suggest any potential issues?

    Leave a comment:


  • replied
    I have just tested it on 4.23 and 4.24 and it is working fine. If you need help, find me on the Discord channel for Gobbo Games (https://discord.gg/jrKNUms) and I will try to help you.
    Last edited by qdelpeche; 11-14-2019, 01:41 AM.

    Leave a comment:


  • replied
    If you want to update the plugin, read the posts from qdelpeche on page 38. I'd suggest finding another plugin if you don't know how to write code, since this one has basically been abandoned.

    Originally posted by qdelpeche View Post
    For everyone else ... it is relatively straightforward to upgrade this to 4.22. I did it last night ... you will need to use the C++ Transition Guide for 4.22 to do it: https://forums.unrealengine.com/deve...guide-for-4-22

    I used a source build of the Engine to do it but it is relatively straight forward. I can't share my binary files with you as I am not the maintainer of the project, but I can try to help you all.
    Originally posted by qdelpeche View Post
    @all - please don't ask me to send you my binary files, it would be against the terms of the Marketplace and my agreement as an Epic Moderator. I am willing to help you get it compiled, so follow these steps first.

    1). Download the Vehicle Physics Plugin to your 4.21 engine.

    2). Download the Vehicle Physics Sample project for 4.19 from here: https://mega.nz/#!PgNhESaA!15x2p5PNY...-qb-0gtkY1lRG4

    3). Install Team Viewer 14 on your machine.

    4). Then contact me via DM and I will remote on to your machine and compile the plugin to v4.22 for you.

    * I just helped to build this on a binary version, so you no longer need the source version. The process takes about 10 minutes.

    ** If you want to chat to me in real time, feel free to drop by the Gobbo Games discord channel: https://discord.gg/jrKNUms

    PLEASE NOTE: I am not ignoring any of you, I am just located in South Africa (GMT+2) which means my time is totally out of sync with most of you. So we will need to schedule Team Viewer access to your machine carefully.

    Leave a comment:


  • replied
    Any updates to Blue Man Vehicle AI Plugin Still stuck in 4.21

    Leave a comment:


  • replied
    I bought the plugin and experiencing difficulty in parking the vehicle still on the ramp with handbrake. As photo displayed, we tested on the example, printed out the Speed of each wheel, from the following part in SuspensionPhysics_component.cpp, it is very close to zero on the ground, but stay around 15 while handbrake is pressed, which suppose to be zero as well.

    Code:
    if (Handbrake)
            {
                N_HandbrakeWheels = N_HandbrakeWheels < 1 ? 1 : N_HandbrakeWheels;
                RollingResistance = FMath::Clamp(((-WheelRollingResistance * 100.0f) + -(Handbrake_Multiplier * 10.0f)) * (Speed * 1.0f), -Handbrake_GripLimit * 1000.0f, Handbrake_GripLimit * 1000.0f) * BodyInstance->GetBodyMass();
                float HandbrakeRollingResistance = -Speed * 20000.0 / N_HandbrakeWheels * StickyTiresHandbrakeMultiplier;
                RollingResistance = FMath::Lerp(RollingResistance, HandbrakeRollingResistance, StickyTiresRatio);
            }
    We realized blueman isn't active anymore, does any owner of plugin has a solution? Where can I find the support email of blueman?

    Thanks! Qing

    Leave a comment:


  • replied
    Hi i love your plugin but plz make something about the car control in 4.21,i did what you say about the put the center of mass to the front of the car,but my game have a lot of jumps, and my car every time in the air point the nose to the ground,if that is no possible in 4.21,plz make this possible in 4.22 or 4.23.
    You have something to work around about that issue?
    Thanks

    Leave a comment:


  • replied
    Hey,

    Just wondering how the plans were going to update this to 4.23.

    Thanks!

    Leave a comment:


  • replied
    Originally posted by Blue man View Post
    Well, it's been some time... sadly...
    Probably gonna sound like a broken record but sorry to anyone who has been waiting for months. It has been difficult to find time to do anything else since I got hired to work full time on a project.
    I had big plans for this plugin but not enough time...

    4.22 update is gonna go out soon and I'll make sure 4.23 support update goes live the same week as the engine release.
    Thank you for the update! Looking forward to purchasing once the 4.22 update goes live!

    Leave a comment:


  • replied
    Well, it's been some time... sadly...
    Probably gonna sound like a broken record but sorry to anyone who has been waiting for months. It has been difficult to find time to do anything else since I got hired to work full time on a project.
    I had big plans for this plugin but not enough time...

    4.22 update is gonna go out soon and I'll make sure 4.23 support update goes live the same week as the engine release.

    Leave a comment:


  • replied
    Hello, guys!

    I am using this vehicle plugin now, but I ran into a problem. My vehicles have a big size opposite to models in a demo project. I increased a Tire size under SuspensionSettings until 200. After that my vehicle barely moved like a zombie Increasing a RPM value and decreasing a mass of vehicle didn't help. I completely stuck at this stage. I don't know what I can do it with it. Please, help me.

    Leave a comment:


  • replied
    Would be nice if the creator would give qdelpeche a green light to go ahead and publish that tutorial (it's not as if the published to-be-changed source code snippets had any real value - would probably even fall into fair use anyway).

    Edit: once VS was upgraded to 2019, updating the plugin to 4.22 was super easy, barely an inconvenience.
    The linked thread with 4.22 C++ changes covers about everything.
    Last edited by Cpt.Trips; 07-16-2019, 06:58 AM.

    Leave a comment:

Working...
X