Hello again! The FGear orbit camera seems to have some fisheye effect or similar, which increae the âspeed feelingâ quite well. Can you point me to the place where these settings come from to tune it? In the Orbit Camera C++ class itself it seems it is just calculating the positioning, but I do not see the (post process?) effects creating that point of view. Thanks a lot!
we do not alter camera fov at all, epic has changed some camera settings in 5.3 maybe thatâs what you are talking about, check this one : Camera FOV is incorrect in Play mode UE5.3
Okay, thanks, that is still weird but a good hint.
I have another issue which came up today. I tried adding a CollisionResponse to my car. I add it via CustomCollision = CreateDefaultSubobject(TEXT(âCustomCollisionâ)); then set it via CustomCollision->SetStaticMesh(ItemCollision.Object); Seems to work, I can see it in the game as a member of my car, having the static mesh set. Then I disabled the CollisionResponse in the physical Asset we used until now. Still working. But if I drive now, I can collide with objects as guard rails, but will ghost through other cars, which do NOT use UFGearCustomCollision but a ânormalâ physical asset. No flags set, all default. Any ideas? These other cars are working like they should, just not when colliding with âthe other way of doing itâ. This is really confusing me here! Thanks a lot! In addition in the docs for the truck there is this image, which shows the used collision box on it, but layed over the mesh, not the collision mesh. How can I see this? It would help debug for sure.
I recommend you to add your custom collider at design time and try applying the same/similar settings in the sample project. if you check the sample project you can see those wireframe like visuals, the custom collider has a special material that displays it like that.
Sometimes the skidding (sound and mark) and smoke effects are activated at very low speed, would it be possible to set a minimum speed for these effects to start working?
ps: I mean wheel speed, not car speed, these effects are good in case of a burnout.
And where is the link for the example project with that new cars on the Fgear marketplace page? The link on description is the old example from 4.27. Âż?
Nevermind, they are in a new Sandbox2 level i just saw.
Warning: If you have difficulty running the example project with Unreal5 copy the FGearPlugin folder in Unreal5\Engine\Plugins to FGearExample\Plugins folder.
Notes
Checkout CoreModule.pdf document for a more detailed explanation of the new replication options.
In client authoritative mode all the vehicles are simulating physics and the control over your vehicle is just like a standalone game. While the input replication is quite similar to the server authoritative mode, state replication is quite different. It is a combination of a network correction and temporary physics blending after collisions. We tried to handle collisions gracefully but you can still encounter bad collision reactions with bad network conditions.
Client authoritative replication can blend replication transform with the physics transform. For this to happen we listen to the NotifyHit callbacks in the vehicle class and trigger the blend if the conditions are met. If the collision profiles of the vehicles are not properly setup then this blend may not be triggered at all and itâs difficult tell whether if itâs working or not. In order to diagnose such issues we introduced a new telemetry option called âPrint Collision Logsâ. When this is on you should see a log printed whenever two vehicles collide at a speed greater then MinCollisionBlendingSpeed. If you do not see the logs you can tell that there is a problem with the collision(hit event) setups. This log is only printed with the client authoritative replication mode.
Existing server authoritative replication is still available but it is off by default. It can be turned back on via setttings in ProjectSettings > Game > FGearCommon.
Each vehicle had its own replication settings and we had the option to override and use common settings(ProjectSettings > Game > FGearCommon). From now on we use the common settings by default and each vehicle can override the settings if needed.
Removed buffered input replication. This prevents any input delay due to server slowdowns.
Reduced default input send rate from 50 to 20 same as state send rate.
Input and state replication variables are now compressed/quantized for reducing bandwidth costs.
Input and state replications are no longer optional but you can set zero send rate for each to pause the RPCs.
Added an AI driver following a spline loop in the Multiplayer map.
Auto drive is no longer a component but an AIController. Instead of adding as a component you need to possess the vehicle with this controller. The controller wonât function with its default form so itâs better to derive from it and create a BP(there is a sample bp called FGearAutoDrive_BP in the sample project). Spawn the controller(you can both manually spawn or let the engine spawn it), tune itâs settings, provide a spline to follow(FGearAutoDrive_BP looks for the first spline in the map and assigns it at beginplay) and finally possess the vehicle. This is exemplified in the AITest map.
Auto drive inputs were applied directly to the vehicle components before but now the inputs are applied via the standard input component. This made it possible to use it with both server & client authoritative replication modes.
Auto drive is no longer ticking by its own but it is updated by the onOverrideInput delegate which is explained below. This letâs the AI inputs to be replicated properly.
Removed overrideInputTick native event and added onOverrideInput delegate instead. This delegate is either called in the actor tick or the replication tick so we can also override inputs in multiplayer.
Mobile input sample now uses the onOverrideInput delegate to inject UI inputs.
Replication component used to override input-reading option of standard input. This is no longer needed and is not mandatory for input overriding.
Checkout CoreModule.pdf document(StandardInput settings) for a more detailed explanation of how you can activate and use enhanced input system.
We have added some basic enhanced input assets under FGearAssets/Inputs folder in the sample project.
Raw input values can be accessed via BP now. This lets you keep current player inputs and modify/alter some of them.
Open differential implementation used to check the wheel rotation speeds but it is only based on wheel load right now which is better at imitating an open diff.
Torque bias ratio was unlimited for locking diff calculation, it is limited to 9:1 now.
Manual transmission rev-matching is only for downshifting.
A sleeping vehicle couldnât wake up in a multiplayer game, this is fixed now.
Users can now query the visual location and rotation of each wheels with UFGearWheel.getWheelPosition and UFGearWheel. getWheelRotation functions.
Forward offset of a wheel can be updated at runtime with UFGearWheel. setLateralOffsets function.
Added a separate option to mute the engine sound when the vehicles goes to sleep.
Added a config line(AspectRatioAxisConstraint) to the DefaultEngine.ini which prevents the camera fov change that started happening after 5.3.
Fixed a crash case which happens when you put a vehicle in a sublevel and stream out in unreal5.
Thank you for implementing âForward offsetâ and the option to keep the engine sound when the vehicle sleeps!
The plugin is compiling without problems for UE4, however it is necessary to enable the âEnhanced Input pluginâ, otherwise the plugin presents an error and does not load. The âEnhanced Input pluginâ is in Beta and does not have full functionality in UE4, I hope there is no risk of any conflict or loss of performance due to the plugin being loaded.
Still about the effects:
When the vehicle sleeps, the smoke particles disappear suddenly, I looked at the code and you are using âmSmokes[i]->SetVisibility(true / false)â, I am not a C++ programmer, I would like to know if it is safe for me to change it to: âmSmokes[i]->Activate() / Deactivate()â, this way the smoke would appear/disappear smoothly and the visibility would change anyway (in addition to the fact that an inactive emitter consumes less resources than an invisible one).
Activating and deactivating the tire smoke at runtime is essential for my project, since the âmEnableTireSmokeâ variable already exists and using âsetEnableSkidmarksâ as an example, if I create the following lines in FGearEffects.h, it would be possible to activate/deactivate the smoke safely at runtime?
UFUNCTION(BlueprintCallable, Category = FGear)
void setEnableTireSmoke(bool e) { mEnableTireSmoke = e; }
UFUNCTION(BlueprintCallable, Category = FGear)
bool getEnableTireSmoke() const { return mEnableTireSmoke; }
I would like to ask you to reconsider your position regarding improvements to the effects system, it is something that enriches the plugin and was one of the reasons that made me decide to purchase it. My suggestion would be:
Checkboxes to enable and disable engine sound and backfire.
A variable to determine when the wheel effects will start, âminSlipFXVelocityâ.
Two runtime functions: âenable/disable smokeâ and âenable/disable backfireâ.
Good but not essential: âFadeOutâ instead of âStopâ on sounds.
This would be more than enough to make the implementation of the effects much more viable, because at the moment itâs more like âuse all or nothingââŚ
it is safe to call activate/deactivate but the effect can be reactivated after sleeping.
I guess it is also safe if you add those functions to enable/disable smoke at runtime(you need to recompile the plugin or use the plugin source as a part of your project or just adding those lines will not make them appear in BP).
effects component was never intended to be used for production, we do some improvements from time to time but a generic implementation can not fit everyoneâs needs, so no promises.
I always need to recompile my plugins with RunUAT to run on UE4 Source.
I would then need a condition to prevent the smoke from activating when the vehicle is sleeping, and if I add â!= mSleepEventsRegisteredâ in the function below, would it work?
If so, which âifâ structure should I put it in? (if you could please rewrite the condition, to avoid mistakes on my part, I am completely new to C++)