logo
Main

Forums

Downloads

Unreal-Netiquette

Donate for Oldunreal:
Donate

borderline

Links to our wiki:
Wiki

Walkthrough

Links

Tutorials

Unreal Reference

Usermaps

borderline

Contact us:
Submit News
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Mesh emitter questions (Read 187 times)
gopostal
Betatester
Offline


Hack coder

Posts: 925
Joined: Jul 31st, 2008
Gender: Male
Mesh emitter questions
Feb 17th, 2019 at 8:08pm
Print Post  
Spent the morning working out mesh emitter (big nod to Bleeder for helping out). I have a few simple-ish questions if anyone gets the time.

-I have my falling leaves spawning correctly and dropping how I want them. Is there a way to randomize the falling? What I mean is they drop with around -40 z and -5 to 5 x/y to give some directional. Can this be adjusted as they are falling so they change direction as they drop? That's the final part to make these look right.

-There is the ability to burn the trees with an energy weapon. Do I just turn the emitter off or should I destroy it when the tree is burned?

-I need the leaf to finish as 'rotator(HitNormal)' relative to the ground. Do I do this in HitWall in the actual code of the emitter class I'm creating?

Thank you guys for your time. Once I get this information down it will be added all over my mod. It's just base-IQ-me trying to grasp some higher level (for my mind) concepts.

  

I don't want to give the end away
but we're all going to die one day
Back to top
 
IP Logged
 
Hellkeeper
Global Moderator
*****
Offline


Soulless Automaton

Posts: 2761
Location: France
Joined: May 21st, 2008
Gender: Male
Re: Mesh emitter questions
Reply #1 - Feb 17th, 2019 at 9:33pm
Print Post  
gopostal wrote on Feb 17th, 2019 at 8:08pm:
-I have my falling leaves spawning correctly and dropping how I want them. Is there a way to randomize the falling? What I mean is they drop with around -40 z and -5 to 5 x/y to give some directional. Can this be adjusted as they are falling so they change direction as they drop? That's the final part to make these look right.


Not in the base actor it seems, but if you are coding your own subclass of it, then the simplest way is the UT2004 way: add VelocityScale.
The base actor has SpeedScale which defines a multiplier for the speed of the particle at relative time in its life (where 0 is the birth of the particle and 1 is its death). UT2004 has the same things but with full coordinates: each list element contains the relative time and a full X,Y,Z min/max array. That allows you to change the movement at any point during the particle's life.

gopostal wrote on Feb 17th, 2019 at 8:08pm:
I need the leaf to finish as 'rotator(HitNormal)' relative to the ground. Do I do this in HitWall in the actual code of the emitter class I'm creating?


The WallImpactAction parameter has an HIT_Script option, I'm sure you can use it to call a script on wall impact (and wall it actually any surface) that forces the rotation of the particle to whatever you want.

The rest is outside my realm of competence.
  

You must construct additional pylons.
Back to top
WWW  
IP Logged
 
gopostal
Betatester
Offline


Hack coder

Posts: 925
Joined: Jul 31st, 2008
Gender: Male
Re: Mesh emitter questions
Reply #2 - Feb 18th, 2019 at 1:59am
Print Post  
Thanks Hk. I saw the HIT_Script but does this utilize a specific function? I can't find an example to follow.

Edit: found it in a parent class. I assume I need to use these functions
Code (C++)
Select All
// Adjust HitLocation to change particle location.
simulated event ParticleWallHit( Actor Particle, vector HitNormal, out vector HitLocation )
{
	Particle.bHidden = true; // Destroys the particle
}
simulated event ParticleZoneHit( Actor Particle, ZoneInfo OtherZone )
{
	if( OtherZone.bWaterZone )
		Particle.bHidden = true; // Destroys the particle
}
 

« Last Edit: Feb 18th, 2019 at 4:18am by gopostal »  

I don't want to give the end away
but we're all going to die one day
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint
Bookmarks: del.icio.us Digg Facebook Google Google+ Linked in reddit StumbleUpon Twitter Yahoo