Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

Engine.SoundNodeDistanceCrossFade


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
/**
 * SoundNodeDistanceCrossFade
 * 
 * This node's purpose is to play different sounds based on the distance to the listener.  
 * The node mixes between the N different sounds which are valid for the distance.  One should
 * think of a SoundNodeDistanceCrossFade as Mixer node which determines the set of nodes to
 * "mix in" based on their distance to the sound.
 * 
 * Example:
 * You have a gun that plays a fire sound.  At long distances you want a different sound than
 * if you were up close.   So you use a SoundNodeDistanceCrossFade which will calculate the distance
 * a listener is from the sound and play either:  short distance, long distance, mix of short and long sounds.
 *
 * A SoundNodeDistanceCrossFade differs from an SoundNodeAttenuation in that any sound is only going
 * be played if it is within the MinRadius and MaxRadius.  So if you want the short distance sound to be 
 * heard by people close to it, the MinRadius should probably be 0
 *
 * The volume curve for a SoundNodeDistanceCrossFade will look like this:
 *
 *                          Volume (of the input) 
 *    FadeInDistance.Max --> _________________ <-- FadeOutDistance.Min
 *                          /                 \
 *                         /                   \
 *                        /                     \
 * FadeInDistance.Min -->/                       \ <-- FadeOutDistance.Max
 *
 * Copyright 1998-2008 Epic Games, Inc. All Rights Reserved.
 **/

class SoundNodeDistanceCrossFade extends SoundNode
	native(Sound)
	collapsecategories
	hidecategories(Object)
	editinlinenew;

struct native DistanceDatum
{
	/** 
	 * The FadeInDistance at which to start hearing this sound.  If you want to hear the sound 
	 * up close then setting this to 0 might be a good option.
	 **/
	var() rawdistributionfloat FadeInDistance;

	/**
	 * The FadeOutDistance is where hearing this sound will end.
	 **/
	var() rawdistributionfloat FadeOutDistance;

	/** The volume for which this Input should be played **/
	var() float Volume;

	structdefaultproperties
	{
		Volume=1.0f
	}
};

/**
 * Each input needs to have the correct data filled in so the SoundNodeDistanceCrossFade is able
 * to determine which sounds to play
 **/
var() export editfixedsize array<DistanceDatum>	CrossFadeInput;


// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)

defaultproperties
{
   Name="Default__SoundNodeDistanceCrossFade"
   ObjectArchetype=SoundNode'Engine.Default__SoundNode'
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: tr 31-1-2018 17:18:10.000 - Creation time: sk 18-3-2018 10:01:14.450 - Created with UnCodeX