hello there
Wheel Particle Effects is tyre smoke and stuff like that on a wheeled vehicle. Its supposed to change according to the material (physical material) your driving on.
It hasnt been working in UDK for a long long time and it looks like its way down Epics list of things to fix.
So here is a dodgy fix by me to get it working again.
put these functions and variable in your vehicle script.
and this in the DefaultProperties blockCode://this code will trace below the vehicle on a timer and get the material type and change the effects //the timer is switched on and off when the driver gets in and out var ParticleSystem WheelParticleEffectsTest[4]; simulated function VehiclePlayEnterSound() { super.VehiclePlayEnterSound(); //START the wheelparticle timer SetTimer(0.5, true, 'FixWheelParticlesPleaseEpic'); } simulated function VehiclePlayExitSound() { super.VehiclePlayExitSound(); //STOP the wheelparticle timer PauseTimer(true, 'FixWheelParticlesPleaseEpic'); } function FixWheelParticlesPleaseEpic() { local vector loc, norm, end; local TraceHitInfo hitInfo; local Actor traceHit; local PlayerController PC; local UTPhysicalMaterialProperty PhysicalProperty; PC = PlayerController(Seats[0].SeatPawn.Controller); end = Location; end.Z = Location.Z -50; traceHit = trace(loc, norm, end, Location, true,, hitInfo); PC.ClientMessage(""); if (traceHit == none) { //PC.ClientMessage("Nothing found, try again."); return; } PhysicalProperty = UTPhysicalMaterialProperty(HitInfo.PhysMaterial.GetPhysicalMaterialProperty(class'UTPhysicalMaterialProperty')); PC.ClientMessage("PhysMaterial: "$PhysicalProperty.MaterialType); //check the material type and change wheel particles if (PhysicalProperty.MaterialType == 'Stone') { PC.ClientMessage("it is "$PhysicalProperty.MaterialType); UDKVehicleWheel(Wheels[0]).SetParticleEffect(self, WheelParticleEffectsTest[0]); UDKVehicleWheel(Wheels[1]).SetParticleEffect(self, WheelParticleEffectsTest[0]); UDKVehicleWheel(Wheels[2]).SetParticleEffect(self, WheelParticleEffectsTest[0]); UDKVehicleWheel(Wheels[3]).SetParticleEffect(self, WheelParticleEffectsTest[0]); } else if (PhysicalProperty.MaterialType == 'Dirt') { PC.ClientMessage("it is "$PhysicalProperty.MaterialType); UDKVehicleWheel(Wheels[0]).SetParticleEffect(self, WheelParticleEffectsTest[1]); UDKVehicleWheel(Wheels[1]).SetParticleEffect(self, WheelParticleEffectsTest[1]); UDKVehicleWheel(Wheels[2]).SetParticleEffect(self, WheelParticleEffectsTest[1]); UDKVehicleWheel(Wheels[3]).SetParticleEffect(self, WheelParticleEffectsTest[1]); } else if (PhysicalProperty.MaterialType == 'Water' || PhysicalProperty.MaterialType == 'ShallowWater') { PC.ClientMessage("it is "$PhysicalProperty.MaterialType); UDKVehicleWheel(Wheels[0]).SetParticleEffect(self, WheelParticleEffectsTest[2]); UDKVehicleWheel(Wheels[1]).SetParticleEffect(self, WheelParticleEffectsTest[2]); UDKVehicleWheel(Wheels[2]).SetParticleEffect(self, WheelParticleEffectsTest[2]); UDKVehicleWheel(Wheels[3]).SetParticleEffect(self, WheelParticleEffectsTest[2]); } else if (PhysicalProperty.MaterialType == 'Snow') { PC.ClientMessage("it is "$PhysicalProperty.MaterialType); UDKVehicleWheel(Wheels[0]).SetParticleEffect(self, WheelParticleEffectsTest[3]); UDKVehicleWheel(Wheels[1]).SetParticleEffect(self, WheelParticleEffectsTest[3]); UDKVehicleWheel(Wheels[2]).SetParticleEffect(self, WheelParticleEffectsTest[3]); UDKVehicleWheel(Wheels[3]).SetParticleEffect(self, WheelParticleEffectsTest[3]); } else { PC.ClientMessage("it is "$PhysicalProperty.MaterialType); UDKVehicleWheel(Wheels[0]).SetParticleEffect(self, WheelParticleEffectsTest[0]); UDKVehicleWheel(Wheels[1]).SetParticleEffect(self, WheelParticleEffectsTest[0]); UDKVehicleWheel(Wheels[2]).SetParticleEffect(self, WheelParticleEffectsTest[0]); UDKVehicleWheel(Wheels[3]).SetParticleEffect(self, WheelParticleEffectsTest[0]); } }
Have fun skidding around in the dirt, stone, snow and waterCode:WheelParticleEffectsTest[0]=ParticleSystem'Envy_Level_Effects_2.Vehicle_Dust_Effects.P_Scorpion_Wheel_Dust' WheelParticleEffectsTest[1]=ParticleSystem'VH_Scorpion.Effects.PS_Wheel_Rocks' WheelParticleEffectsTest[2]=ParticleSystem'Envy_Level_Effects_2.Vehicle_Water_Effects.P_Scorpion_Water_Splash' WheelParticleEffectsTest[3]=ParticleSystem'Envy_Level_Effects_2.Vehicle_Snow_Effects.P_Scorpion_Wheel_Snow'![]()





Reply With Quote



, maybe epic has propper broken it now lol.

) as I mentioned, I only applied a basic velocity scaling. To monitor for slip, I believe wheels have a bIsSquealing bool you can check for, and use that to modulate the wheelslip param. Consider monitoring the vehicle's relative sideaways velocity ( Velocity << Rotation).Y to see if it's moving sideaways and by how much. Then perhaps also check Throttle value to see if it's -1 (braking) when the vehicle is moving forwards quickly, etc.


Bookmarks