Odorant Cone
Last updated
Last updated
Odorant Cone was designed to accommodate the complicated nature of interacting with an object and intentionally smelling an odor effusing from said object. It may help to show a little math here to describe how it works. But first, let's take a look at some of the options that are unique to Odorant Cone . Odorant Vector determines two things: the size of the odor zone, just like the Outer Radius of Odorant Sphere; and it determines the direction of the scent. Inner Diffusion Angle defines a spherical sector. If the Olfactory Epithelium is within the inner spherical sector, the directional scale is set to one.
Outer Diffusion Angle defines a spherical sector. If the Olfactory Epithelium is anywhere outside of the outer spherical sector, the directional scale is set to zero.
Radial Scaler changes how the directional scaler interpolates between the inner and outer spherical sector.
Decay Seconds determines the life-span of the odor after activation. Activation can be done through code with OdorantSpecific.EmitOdorant()
. After that, the countdown begins, and the odor gradually decays. Think of a trash can opening, or decanting a beverage. If Decay Seconds is set to a negative value, it will be continuously active, like an exhaust vent or a candle burning. No need to activate it through code.
OdorantIntensity = distanceScaler * decayScaler * directionalScaler * maximumThreshold
A set of gizmo lines will appear in editor on an Odorant Specific component based on the Odorant Vector and the Diffusion Angles. Blue lines represent the sides of the inner spherical sector and the cyan lines represent the sides of the outer spherical sector.