Page 1 of 2 12 LastLast
Results 1 to 40 of 45
  1. #1
    God King
    Join Date
    Feb 2010
    Location
    Tegleg Records
    Posts
    4,399
    Gamer IDs

    Gamertag: tegleg digital

    Smile [Code] Wheel Particle Effects Fix

    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.
    Code:
    //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]);
           }
    
    }
    and this in the DefaultProperties block
    Code:
    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'
    Have fun skidding around in the dirt, stone, snow and water
    Last edited by tegleg; 05-26-2011 at 06:24 AM.
    Code:
    We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
    LOOK>> Please ask questions in the forum, NOT a private message <<LOOK
    tegleg.co.uk
    My Tutorials n Stuff
    Games: NEW! Tegs Playground Multiplayer Edition
    Unwheel2 - VCTF Game - Sponic Mesh 3D
    Shh.. dont tell anyone about my android apps.
    will code for money

  2. #2

  3. #3
    MSgt. Shooter Person
    Join Date
    Sep 2006
    Posts
    288

    Default

    Oh, cool, no UnWheel2's vehicles will have tire smoke again. Thanks tegleg!!

    Steven

  4. #4
    Banned
    Join Date
    Aug 2011
    Posts
    311

    Default

    If I put this into my vehicle script how will the vehicle I am driving know that it is traversing over snow? If I only want the snow effect playing when moving then do I just delete the other bits of code?

    Thanks.
    Last edited by GentlemenGraphics; 10-10-2011 at 11:55 AM.

  5. #5
    God King
    Join Date
    Feb 2010
    Location
    Tegleg Records
    Posts
    4,399
    Gamer IDs

    Gamertag: tegleg digital

    Default

    it looks at (traces) the material below the car and gets its physical material.
    make a copy of PM_Dirt, open its properties and change Dirt to Snow here - PhysicalMaterialProperty - MaterialType - Dirt.
    then apply that to your floor material in the material editor.

    http://udn.epicgames.com/Three/Mater...perties%20Pane
    http://udn.epicgames.com/Three/PhysicalMaterial.html

    note* doesnt seem to work too well with landscapes
    and changing friction has no effect (unless epic has fixed it but i havnt tested it recently)
    Last edited by tegleg; 10-10-2011 at 03:19 PM.
    Code:
    We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
    LOOK>> Please ask questions in the forum, NOT a private message <<LOOK
    tegleg.co.uk
    My Tutorials n Stuff
    Games: NEW! Tegs Playground Multiplayer Edition
    Unwheel2 - VCTF Game - Sponic Mesh 3D
    Shh.. dont tell anyone about my android apps.
    will code for money

  6. #6
    Banned
    Join Date
    Aug 2011
    Posts
    311

    Default

    Quote Originally Posted by tegleg View Post
    it looks at (traces) the material below the car and gets its physical material.
    make a copy of PM_Dirt, open its properties and change Dirt to Snow here - PhysicalMaterialProperty - MaterialType - Dirt.
    then apply that to your floor material in the material editor.

    http://udn.epicgames.com/Three/Mater...perties%20Pane
    http://udn.epicgames.com/Three/PhysicalMaterial.html

    note* doesnt seem to work too well with landscapes
    and changing friction has no effect (unless epic has fixed it but i havnt tested it recently)
    ALRIGHT will try this thanks.

  7. #7
    Banned
    Join Date
    Aug 2011
    Posts
    311

    Default

    Quote Originally Posted by tegleg View Post
    note* doesnt seem to work too well with landscapes
    and changing friction has no effect (unless epic has fixed it but i havnt tested it recently)
    Yes, I have tried to get PM dirt and Pm energy to work on the landcape/terrian but it has no effect, well it isn't visible lets just say. TegLeg do you know of or could recomend me some possible ways of achieving the look I desire snow particle effect on ground/roads? Thank you.

    I have tried to put pm_dirt in a static mesh in the physics section but there is no box which I can attach it to.

    Thanks once again

    I still need to add your code, sorry, but will your code allow pm_dirt to show/work on landscape as I have tried default code and it doesn't?
    Last edited by GentlemenGraphics; 10-12-2011 at 07:24 AM.

  8. #8
    The Sacrifice
    Join Date
    Nov 2009
    Posts
    228
    Gamer IDs

    Gamertag: GeekyPayback

    Lightbulb

    Can I suggest an improvement? The code below gets rid of all your unnecessary if statements and means you can just add any new supported materials to the default properties.

    NB. This is completely untested, I just based it off your code combined with UTs weapon impact effect which does a similar task

    Code:
    /** struct for list to map material types supported by an actor to impact sounds and effects */
    struct MaterialWheelEffect
    {
    	var name MaterialType;
    	var ParticleSystem ParticleTemplate;
    };
    
    /** impact effects by material type */
    var array<MaterialWheelEffect> WheelParticleEffects;
    
    function FixWheelParticlesPleaseEpic()
    {
    	local vector loc, norm, end;
    	local TraceHitInfo hitInfo;
    	local Actor traceHit;
    	local PlayerController PC;
    	local UTPhysicalMaterialProperty PhysicalProperty;
    	local int wheel, i;
    
        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);
    
    	if (PhysicalProperty != None && PhysicalProperty.MaterialType != 'None')
    	{
    		i = default.WheelParticleEffects.Find('MaterialType', PhysicalProperty.MaterialType);
    		if (i == -1)
    			return;
    	}
    	
    	for (wheel = 0; wheel < 4; wheel++)
    		UDKVehicleWheel(Wheels[wheel]).SetParticleEffect(self, WheelParticleEffects[i].ParticleTemplate);
    
    }
    default properties will be something like

    Code:
    MaterialWheelEffect[0]=(MaterialType='Snow', ParticleSystem='Envy_Level_Effects_2.Vehicle_Snow_Effects.P_Scorpion_Wheel_Snow')

  9. #9
    God King
    Join Date
    Feb 2010
    Location
    Tegleg Records
    Posts
    4,399
    Gamer IDs

    Gamertag: tegleg digital

    Default

    you are very welcome to improve it GeekyPayback. no idea if your code works though, havnt tested it.

    @GentlemenGraphics
    is english not your native language?
    please try and read what i wrote before, you cannot see physical materials.

    ask in the level design section about level design.
    Code:
    We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
    LOOK>> Please ask questions in the forum, NOT a private message <<LOOK
    tegleg.co.uk
    My Tutorials n Stuff
    Games: NEW! Tegs Playground Multiplayer Edition
    Unwheel2 - VCTF Game - Sponic Mesh 3D
    Shh.. dont tell anyone about my android apps.
    will code for money

  10. #10
    God King
    Join Date
    Feb 2010
    Location
    Tegleg Records
    Posts
    4,399
    Gamer IDs

    Gamertag: tegleg digital

    Default

    it doesnt seem to work any more , maybe epic has propper broken it now lol.
    does it work for anyone else?
    Code:
    We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
    LOOK>> Please ask questions in the forum, NOT a private message <<LOOK
    tegleg.co.uk
    My Tutorials n Stuff
    Games: NEW! Tegs Playground Multiplayer Edition
    Unwheel2 - VCTF Game - Sponic Mesh 3D
    Shh.. dont tell anyone about my android apps.
    will code for money

  11. #11
    MSgt. Shooter Person
    Join Date
    Sep 2006
    Posts
    288

    Default

    I played with this earlier in the week. I went back and added rubber Physical Material to the tire materials, made sure the road materials had Physical Materials, but still no tire smoke. I was not testing terrains, but static meshes.
    I got to wondering if just creating a new emitter, like what we use for the exhaust in the UnWheel vehicles, but placed behind and slightly above the center of the tire would work. The problem would be changing the emitter as the surfaces changed.

    Steven

  12. #12
    MSgt. Shooter Person
    Join Date
    Jul 2011
    Posts
    50

    Default

    Attach the Emitter to the Vechile.

  13. #13
    God King
    Join Date
    Feb 2010
    Location
    Tegleg Records
    Posts
    4,399
    Gamer IDs

    Gamertag: tegleg digital

    Default

    this is quite typical of udk, instead of fixing things they add new features (that are also broken).
    its probably been a year since this was first reported and all they can do is break it more

    @epic
    is it even on the list of things to fix or do we have to literally re-invent the wheel ourselves?
    Code:
    We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
    LOOK>> Please ask questions in the forum, NOT a private message <<LOOK
    tegleg.co.uk
    My Tutorials n Stuff
    Games: NEW! Tegs Playground Multiplayer Edition
    Unwheel2 - VCTF Game - Sponic Mesh 3D
    Shh.. dont tell anyone about my android apps.
    will code for money

  14. #14
    Iron Guard
    Join Date
    Jan 2009
    Posts
    768

    Default

    Well to be fair, you've already written most of a replacement. Attach a particle system component to each wheel and run a short trace every .5s or so under the vehicle (or for each wheel if you care enough) to return the surface type underneath, if any. Use the results to set the emitter in the wheel's component. Use height distance from the trace, and pawn velocity to control a spawnperunit value in whichever emitter you created to taste.
    The performance saving of the native version isnt really worth sweating over a few traces imo.

    edit, sry didnt check back to the first post to see how much you had done already, hey-ho >.<

    edit 2: check PoweredUpEffect in UT_Attachment_LinkGun for a how-to
    Last edited by Jetfire; 10-13-2011 at 05:13 PM.

  15. #15
    Iron Guard
    Join Date
    Jan 2009
    Posts
    768

    Default

    So I took a little time out, since I needed to fix up Planetstorm's ones anyway:

    Notes: This will automatically iterate over all your vehicles wheels, adding an effect to each one. Add a socket to each wheel, call it 'WheelEffectSocketn' where n is from 0 to however many wheels. nb i attached my sockets to the axels because I couldnt be bothered checking if the emitters spawned in world or local space, and the wheel bones spin ;p)

    I used the existing wheel effects array, my code below has custom ps emitters, swap them back to epic's or whatever

    Because I used the existing array, in each of your wheels, in defprops, add 'bUseMaterialSpecificEffects=false' to null out epic's stuff

    Epics wheel emitters have a parameter called 'WheelSlip', drive it however you want, i just added basic velocity scaling

    This code comes without warranty, worksforme.

    Code:
    var array<ParticleSystemComponent> WheelPSCs;
    var ParticleSystem DefaultWheelPSCTemplate;
    var ParticleSystem WheelParticleEffect, OldWheelParticleEffect;
    
    simulated event PostBeginPlay()
    {
    	local int i;
    	
    	super.PostBeginPlay();
    
    	if (Mesh != None)
    	{
    		SetTimer(0.1, true, 'CheckWheelEmitters');
    		for( i=0; i< Wheels.Length; i++ )
    		{
    			WheelPSCs[i] = new () class'ParticleSystemComponent';
    			if( WheelPSCs[i] != none )
    			{
    				WheelPSCs[i].SetTemplate(DefaultWheelPSCTemplate);
    				Mesh.AttachComponentToSocket(WheelPSCs[i], name("WheelEffectSocket"$i));
    			}
    			OldWheelParticleEffect = DefaultWheelPSCTemplate;
    		}
    	}
    }
    
    simulated function CheckWheelEmitters()
    {
    	local vector loc, norm, end;
    	local TraceHitInfo hitInfo;
    	local Actor traceHit;
    	local UTPhysicalMaterialProperty PhysicalProperty;
    	local int i;
    	
    	end = Location;
    	end.Z = Location.Z -128;
    	traceHit = trace(loc, norm, end, Location, false,, hitInfo);
    
    	if (traceHit == none)
    	{
    		return;
    	}
    
        PhysicalProperty = UTPhysicalMaterialProperty(HitInfo.PhysMaterial.GetPhysicalMaterialProperty(class'UTPhysicalMaterialProperty'));
    
         //check the material type and change wheel particles
    	if( PhysicalProperty != none )
    	{
    		for(i = 0; i < WheelParticleEffects.Length; i++ )
    		{
    			 if( PhysicalProperty.MaterialType == WheelParticleEffects[i].MaterialType )
    			{
    				 WheelParticleEffect = WheelParticleEffects[i].ParticleTemplate;
    				 break;   
    			}
    		}
    	}
    	if( WheelParticleEffect != none && WheelParticleEffect != OldWheelParticleEffect )
    	{
    		for( i=0; i<WheelPSCs.Length; i++ )
    		{
    			WheelPSCs[i].SetTemplate(WheelParticleEffect);
    		}
    		OldWheelParticleEffect = WheelParticleEffect;
    	}
    	
    	for( i=0; i<WheelPSCs.Length; i++ )
    	{
    		WheelPSCs[i].SetFloatParameter('Wheelslip', 1.0 + 9.0*FClamp(VSizeSq(Velocity)/MaxSpeed, 0.0, 1.0)); // input range is 1-10
    	}
    }
    
    DefaultProperties
    {
        WheelParticleEffects.Empty
        WheelParticleEffects[0]=(MaterialType=Generic,ParticleTemplate=ParticleSystem'VEC_USN_hare.Vehicle_Dust_Effects.Hare_Wheel_Dust')
        WheelParticleEffects[1]=(MaterialType=Dirt,ParticleTemplate=ParticleSystem'VEC_USN_hare.Vehicle_Dust_Effects.Hare_Wheel_Rocks')
        WheelParticleEffects[2]=(MaterialType=Water,ParticleTemplate=ParticleSystem'VEC_USN_hare.Vehicle_Dust_Effects.Hare_Wheel_Water')
        WheelParticleEffects[3]=(MaterialType=Snow,ParticleTemplate=ParticleSystem'VEC_USN_hare.Vehicle_Dust_Effects.Hare_Wheel_Snow')
        DefaultWheelPSCTemplate=ParticleSystem'VEC_USN_hare.Vehicle_Dust_Effects.Hare_Wheel_Rocks'
    Last edited by Jetfire; 10-15-2011 at 12:40 PM.

  16. #16
    MSgt. Shooter Person
    Join Date
    Sep 2006
    Posts
    288

    Default

    Thanks a lot Jetfire. Will it also generate tire smoke from wheel slip, as well as dust on terrains? I will do some testing and get back with my results.

    Steven

  17. #17
    MSgt. Shooter Person
    Join Date
    Sep 2006
    Posts
    288

    Default

    Thanks a lot Jetfire. Will it also generate tire smoke from wheel slip, as well as dust on terrains? I will do some testing and get back with my results.

    Steven

  18. #18
    God King
    Join Date
    Feb 2010
    Location
    Tegleg Records
    Posts
    4,399
    Gamer IDs

    Gamertag: tegleg digital

    Default

    thanks jetfire
    appreciated
    Code:
    We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
    LOOK>> Please ask questions in the forum, NOT a private message <<LOOK
    tegleg.co.uk
    My Tutorials n Stuff
    Games: NEW! Tegs Playground Multiplayer Edition
    Unwheel2 - VCTF Game - Sponic Mesh 3D
    Shh.. dont tell anyone about my android apps.
    will code for money

  19. #19
    God King
    Join Date
    Feb 2010
    Location
    Tegleg Records
    Posts
    4,399
    Gamer IDs

    Gamertag: tegleg digital

    Default

    doesnt work for me.
    what build are you using jetfire?

    its basically a more elegant rewrite of what i had before, exept theres no direct access to the wheel for changing slip values and such.
    Last edited by tegleg; 10-14-2011 at 07:38 AM.
    Code:
    We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
    LOOK>> Please ask questions in the forum, NOT a private message <<LOOK
    tegleg.co.uk
    My Tutorials n Stuff
    Games: NEW! Tegs Playground Multiplayer Edition
    Unwheel2 - VCTF Game - Sponic Mesh 3D
    Shh.. dont tell anyone about my android apps.
    will code for money

  20. #20
    Iron Guard
    Join Date
    Jan 2009
    Posts
    768

    Default

    June or thereabouts, but nothing I wrote there has any dependancies on anything under the hood, unless Trace suddenly stopped working

    use `log('DERP ' $ variablename); at various points to dump out to the log window whatever vars you want to monitor to check your code is working. Just saying 'it doesnt work' isnt sufficient, there must be a specific place it's not doing what is expected.
    You read my comments, added sockets to your vehicle mesh, etc, yes? You've checked the emitters you're using in your build to make sure the wheelslip spawn rate param is working as expected?

    @ Steve (I'm a Steve too btw ) 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.
    There's also the handbrake to consider ( though I wrote a custom one for PS as epic's one didnt give me the skiddy results I wanted), which you can check for by seeing if Rise > 0

    Basically there's no real need for 'direct access to the wheel for changing slip values and such' when you can just monitor a bunch of parameters yourself and do things exactly how you want. Not being able to access the specific wheel's 'how much am i slipping' variable directly so far as I can tell isn't a big deal, as when a wheel is actually slipping, in the simulation, rarely matches up with your expected gameplay 'i should be seeing slip effects now', as can be seen from when epic's effects did 'work'

    (I said 'no warranty' )
    Last edited by Jetfire; 10-14-2011 at 08:40 AM.

  21. #21
    God King
    Join Date
    Feb 2010
    Location
    Tegleg Records
    Posts
    4,399
    Gamer IDs

    Gamertag: tegleg digital

    Default

    oops forgot the sockets, ill try again.
    i was talking about varying the amount of grip for the different surfaces and not when its sliding.
    ill sort something out myself ta.
    Code:
    We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
    LOOK>> Please ask questions in the forum, NOT a private message <<LOOK
    tegleg.co.uk
    My Tutorials n Stuff
    Games: NEW! Tegs Playground Multiplayer Edition
    Unwheel2 - VCTF Game - Sponic Mesh 3D
    Shh.. dont tell anyone about my android apps.
    will code for money

  22. #22
    Iron Guard
    Join Date
    Jan 2009
    Posts
    768

    Default

    Well thats a different issue entirely, and its not something I can say for sure whether the surfacetype has EVER affected a wheel's friction, but it's again not hard to add your own, just come up with a array of lat/long slip values you like , and apply them to the wheels when appropriate, much like how I did for my custom handbrake

    edit: updated that code to fix some heinous logspam i missed Č.Č
    Last edited by Jetfire; 10-14-2011 at 06:40 PM.

  23. #23
    God King
    Join Date
    Feb 2010
    Location
    Tegleg Records
    Posts
    4,399
    Gamer IDs

    Gamertag: tegleg digital

    Default

    got it working
    thanks for updating but this gives me errors so i just deleted it.

    RumbleEffect.ActivateEffects(,,self,self);

    if(WorldInfo.NetMode != NM_DedicatedServer && Seats[1].SeatMotionAudio == none && TurretMovementSound != none)
    {
    Seats[1].SeatMotionAudio = CreateAudioComponent(TurretMovementSound, false, true, true, Location);
    }
    Code:
    We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
    LOOK>> Please ask questions in the forum, NOT a private message <<LOOK
    tegleg.co.uk
    My Tutorials n Stuff
    Games: NEW! Tegs Playground Multiplayer Edition
    Unwheel2 - VCTF Game - Sponic Mesh 3D
    Shh.. dont tell anyone about my android apps.
    will code for money

  24. #24
    Iron Guard
    Join Date
    Jan 2009
    Posts
    768

    Default

    good stuff and oops! sry, some extraneous stuff from our weaponised jeep ;p

  25. #25
    Iron Guard
    Join Date
    Jan 2009
    Posts
    768

    Default

    No idea, sorry, we're not using them. I thought there was a bug with them anyway? You'd have to see what info you can log out of the hitinfo data, see if the trace is even returning the landscape material before it gets to finding that material's physmat.

    Edit, mmm its actually only ever returning the default physmat, a glitch in the code i posted is masking that in your version.

    Edit 2:
    Code:
    simulated function CheckWheelEmitters()
    {
    	local vector loc, norm, end;
    	local TraceHitInfo hitInfo;
    	local Actor traceHit;
    	local UTPhysicalMaterialProperty PhysicalProperty;
    	local int i;
    	
    	end = Location;
    	end.Z = Location.Z -128;
    	traceHit = trace(loc, norm, end, Location, false,, hitInfo);
    
    	if (traceHit == none)
    	{
    		return;
    	}
    	if( HitInfo.HitComponent != none && Landscape(HitInfo.HitComponent.Owner) != none )
    		PhysicalProperty = UTPhysicalMaterialProperty(Landscape(HitInfo.HitComponent.Owner).LandscapeMaterial.GetPhysicalMaterial().GetPhysicalMaterialProperty(class'UTPhysicalMaterialProperty'));
    //		`log( HitInfo.Material $ ' ' $ HitInfo.PhysMaterial $ ' ' $ Landscape(HitInfo.HitComponent.Owner).LandscapeMaterial.GetPhysicalMaterial() );
    	else
    		PhysicalProperty = UTPhysicalMaterialProperty(HitInfo.PhysMaterial.GetPhysicalMaterialProperty(class'UTPhysicalMaterialProperty'));
    
         //check the material type and change wheel particles
    	if( PhysicalProperty != none )
    	{
    		for(i = 0; i < WheelParticleEffects.Length; i++ )
    		{
    			 if( PhysicalProperty.MaterialType == WheelParticleEffects[i].MaterialType )
    			{
    				 WheelParticleEffect = WheelParticleEffects[i].ParticleTemplate;
    				 break;   
    			}
    		}
    	}
    	else
    		WheelParticleEffect = DefaultWheelPSCTemplate; // prolly means it should be an empty emitter, mb a tiny amount of shed dust to taste
    		
    	if( WheelParticleEffect != none && WheelParticleEffect != OldWheelParticleEffect )
    	{
    		for( i=0; i<WheelPSCs.Length; i++ )
    		{
    			WheelPSCs[i].SetTemplate(WheelParticleEffect);
    		}
    		OldWheelParticleEffect = WheelParticleEffect;
    	}
    	
    	for( i=0; i<WheelPSCs.Length; i++ )
    	{
    		WheelPSCs[i].SetFloatParameter('Wheelslip', 1.0 + 9.0*FClamp(VSizeSq(Velocity)/MaxSpeed, 0.0, 1.0)); // input range is 1-10
    	}
    }
    No access to physmask stuff though, so use your single physmat wisely...
    Last edited by Jetfire; 10-15-2011 at 08:38 PM.

  26. #26
    Iron Guard
    Join Date
    Jan 2009
    Posts
    768

    Default

    Little bump in case interested parties didn't get a thread update notification, see above for a fix for Landscape physmat detection

  27. #27
    God King
    Join Date
    Feb 2010
    Location
    Tegleg Records
    Posts
    4,399
    Gamer IDs

    Gamertag: tegleg digital

    Default

    thanks Jetfire

    i dont understand why my static mesh's are not recognised. it looks straight through them, if theres a landscape below it will see that, otherwise the log says none for phys mat.
    seems like its the collision, although you do collide with it in the game.

    is this right?
    in 3ds max create a model called 'box'. a collision model called 'UCX_box'. export 'box' as fbx.
    import to udk. in static mesh editor just tick 'simple line collision'.
    add the material (with a physical material of course)

    anything i missed?
    Code:
    We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
    LOOK>> Please ask questions in the forum, NOT a private message <<LOOK
    tegleg.co.uk
    My Tutorials n Stuff
    Games: NEW! Tegs Playground Multiplayer Edition
    Unwheel2 - VCTF Game - Sponic Mesh 3D
    Shh.. dont tell anyone about my android apps.
    will code for money

  28. #28
    The Sacrifice
    Join Date
    Jun 2012
    Posts
    198

    Default

    Is this code still working today ? I have tried the code of Jetfire but it does emit dust only one time when the vehicle spawn, and then nothing ! I have tried the vehicle on a static mesh and on a landscape but it's keep making the same thing (only dust when the vehicle spawn). I have correctly set the physical materials since it work with my weapon effects...

  29. #29
    God King
    Join Date
    Feb 2010
    Location
    Tegleg Records
    Posts
    4,399
    Gamer IDs

    Gamertag: tegleg digital

    Default

    last time i checked epics system was working so this was obsolete. check the scorpion for details.
    gosh i hope they didnt break it again
    Code:
    We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
    LOOK>> Please ask questions in the forum, NOT a private message <<LOOK
    tegleg.co.uk
    My Tutorials n Stuff
    Games: NEW! Tegs Playground Multiplayer Edition
    Unwheel2 - VCTF Game - Sponic Mesh 3D
    Shh.. dont tell anyone about my android apps.
    will code for money

  30. #30
    The Sacrifice
    Join Date
    Jun 2012
    Posts
    198

    Default

    Oh okay but the scorpion vehicle doesn't show any visible dust to me when I drive it (but I am on still on the July 2012 version) :/

    I will give a look

  31. #31
    MSgt. Shooter Person
    Join Date
    Jan 2008
    Posts
    255

    Default

    Same here (i.e. no tire effects visible) and I am using the November 2012 build. Is the problem the particle effect itself just not being big enough?

  32. #32
    God King
    Join Date
    Feb 2010
    Location
    Tegleg Records
    Posts
    4,399
    Gamer IDs

    Gamertag: tegleg digital

    Default

    try with a new particle system, so it has those big multicoloured crosses and it will be easy to see.
    Code:
    We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
    LOOK>> Please ask questions in the forum, NOT a private message <<LOOK
    tegleg.co.uk
    My Tutorials n Stuff
    Games: NEW! Tegs Playground Multiplayer Edition
    Unwheel2 - VCTF Game - Sponic Mesh 3D
    Shh.. dont tell anyone about my android apps.
    will code for money

  33. #33
    MSgt. Shooter Person
    Join Date
    Jan 2008
    Posts
    255

    Default

    I took your advice Tegleg and created a black smoke particle effect for the tires. Sure enough, the effect does show up on my vehicle. So the problem is the particle effect and not UDK or the unreal script code.

  34. #34
    The Sacrifice
    Join Date
    Jun 2012
    Posts
    198

    Default

    Sorry to bump this thread again, I have successfully manage to display the wheel effect using the UT3 code, but like before the problem is that the particles are only emitted one time when the vehicle spawn, it is not looped. Also, if I quickly enter and drive the vehicle, the particles will follow the wheels.

    Does anyone already experienced this ?

  35. #35
    MSgt. Shooter Person
    Join Date
    Jan 2008
    Posts
    255

    Default

    Well, here's a quick update on my efforts. After determining that the tire wheel effects were working I realized that the problem was simply that the effect wasn't BIG enough for my vehicles. So I went into UDK and made a copy of the tire particle effect, linked the new name into my vehicle code and scaled the entire effect up a bit. I think I also added another smoke emitter at the time and she works just fine. So in my case the effect was there it just wasn't big enough. Please note that my vehicle uscript code is extended from the UT scorpion vehicle or UTvehicle.uc
    Last edited by DemoMan2; 01-08-2013 at 01:53 PM.

  36. #36
    The Sacrifice
    Join Date
    Jun 2012
    Posts
    198

    Default

    Quote Originally Posted by DemoMan2 View Post
    Well, here's a quick update on my efforts. After determining that the tire wheel effects were working I realized that the problem was simply that the effect wasn't BIG enough for my vehicles. So I went into UDK and made a copy of the tire particle effect, linked the new name into my vehicle code and scaled the entire effect up a bit. I think I also added another smoke emitter at the time and she works just fine. So in my case the effect was there it just wasn't big enough. Please note that my vehicle uscript code is extended from the UT scorpion vehicle or UTvehicle.uc
    Thanks for your answer DemoMan2, but what do you mean by "wasn't big enough" ? Because the problem I am encountering is that the particles are displayed but they are not looped and are only played one time when I start the vehicle. I am of course extending from UTVehicle and I use the same code as the scorpion.

    Is there a parameter in Unreal Cascade that I have to check in order to make my particles to be "loopable" ?

  37. #37
    God King
    Join Date
    Feb 2010
    Location
    Tegleg Records
    Posts
    4,399
    Gamer IDs

    Gamertag: tegleg digital

    Default

    yes there is a parameter
    check the default scorpion one for the name
    Code:
    We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
    LOOK>> Please ask questions in the forum, NOT a private message <<LOOK
    tegleg.co.uk
    My Tutorials n Stuff
    Games: NEW! Tegs Playground Multiplayer Edition
    Unwheel2 - VCTF Game - Sponic Mesh 3D
    Shh.. dont tell anyone about my android apps.
    will code for money

  38. #38
    The Sacrifice
    Join Date
    Jun 2012
    Posts
    198

    Default

    Hey I'm sorry but there is no way I can get this to work ! I'm using the code of the scorpion vehicle and the particles system is only played one time when the vehicle is being hit/moved, and then nothing.

    I've tried to copy/past the config of "Envy effects - wheel snow effect" but it doesn't fix.

    Can you please tell me what's wrong ?

  39. #39
    MSgt. Shooter Person
    Join Date
    Jan 2008
    Posts
    255

    Default

    HexOn,
    Simply put, the SCALE of my effect was to small for my vehicles. It was there but simply not showing up because it was too small to be seen. My vehicle is based on the UDK version of UTVehicle.uc code and seems to activate once someone touches the vehicle and/or drives the vehicle. Interestingly the effect doesn't seem to shut off when the driver leaves the vehicle so I think that is something in the UDK code.

    I haven't experienced the problem you seem to be having with the "looping" issue. My particle effect puffs out stuff for about 3-5 seconds and since the vehicle is moving during that time it gives you that "Trail" like tire effect. Note that I just took a copy of the existing tire effect and modified it rather that starting a new effect from scratch. What version of UDK or UT3 are you using to build your game on?

  40. #40
    The Sacrifice
    Join Date
    Jun 2012
    Posts
    198

    Default

    Okay thanks DemoMan2, I'm using the November 2012 release.

    I will try to modify the scorpion effect rather than starting a new one from scratch. Just to be sure could you please tell me which one you used to modify it ?


 
Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.