you are saying yes and no at the same time. you can prevent steering right? so what’s the problem?
that warning does not come from those 2 nodes…
Hi, I saw a post made last year (#196, #197, #198 on page 14 to be exact) talking about adapting how drifting is calculated and recognized. I’m very interested in picking up this project to play around with making a drift mechanic that tracks scores and this seems to be a working solution. Have there been any changes to this implementation since it has been posted or would you recommend any new or simpler ways that have come up since that previous discussion? I want to make sure if I purchase this that I am still able to achieve what I need to.
there is no change about that since then and it’s just one way to do it, there might be several other ways but they would be similar i think.
you can just use it and improve if you encounter any problems.
**lazybitgames: **Hello, FGearCustomCollision component have Collision Object Type “WorldDynamic” instead of “Vehicle”. And cannot be changed in BP. Is that intentionall?
hi @rotacak
Can you remove collision keyword in hidecategories meta in FGearCustomCollision.h line:9 and recompile. if your project is only blueprint, Add static mesh component to your vehicle class. Set mass scale to 0 in staticmeshcomponent for not effect to inertia.
pls let me know if any problem
lazybitgames: Thanks, I solved it now. But I have another problem, when I will remove all gear ratios and use SetGearRatio (from the blueprints), then it will crash. Is there a way how I can add the gear ratios?
if you remove all ratios then you will be accessing an empty array, first call setGearCount to resize the array and then you can call setGearRatio.
I tried that but it will crash anyway with same crash message
the bp code in the image works fine.
but i found a problem not related to the crash, we used array.reserve instead of array.resize so it’s not possible to shrink the array size at the moment.
if you are using c++ it’s a single line fix but not possible with BPs. if you need a fix for this(not the crash), drop me a mail.
**lazybitgames: **Wait, how that your bp code could work? Only in case that you did not deleted all gears, right? Will it be fixed in next version?
my code works normally the only problem is that you can increase gear count but can’t decrease it.
it will be fixed in the next release but as i said i can provide a fixed build for you.
BUT this fix is not the solution to your crash, you must be doing something wrong, call setGearCount and don’t forget that if you need 6 gear transmission you need a size of 7, an extra to be used for rear gear ratio.
I am doing this:
- open fgear example
- open truck BP
- delete all gear ratios
- in begin play do SetGearCount() to 10
- after that do SetGearRatio() for gear 0 to ratio 0.5 for example
- crash
This does not crash for you?
did the same with the BP in the image, no crash.
@rotacak can you try this:
I tried it and did only SetGearRatio() for gear 0. No crash.
Then added SetGearRatio() for gear 1. No crash.
Then added SetGearRatio() for gear 2 and it crashed again.
allright fixed it, drop me a mail, i will upload a fixed build(4.25) for you.
Hello, I have another complication, that was already discussed here. How to properly stop the car? There seems is no way how to hold hand brake from the blueprints (not by pressing the keys) when the fgear standard input is enabled. Or it is possible? Because only that is probably the only way, how to really stop the car (+ used Sticky Tire Max Speed).
If I will not use the hand brake, but only increase Rolling Resistance Coeficient to absurd number then the wheels are stopped but the car is still slowly sliding away. Even on a very small slope. If I will use also Sticky Tire Max Speed option then it will slide slower but still not stop completely.
So question is: is possible to somewhat simulate pressing handbrake from the blueprints when the fgear standard input is enabled? Or will be?
did you try the EnterExit map? get in the car and get out on a slope, the handbrake is turned on and sticky tires handle the rest.
Hmm, there it works. Probably because SetBraking() is called from the level blueprint. But if I will use EventTick->SetBraking() in the car BP then it not brake at all. Should it work there too?