AccelerationModifier Class

Summary

A FlexiMotion.Modifiers.FlexiMotionModifier which accelerates the simulated objects.
graph BT Type-->Base0["FlexiMotionModifier"] click Base0 "/flexi-motion/api/FlexiMotion.Modifiers/FlexiMotionModifier" Base0-->Base1["MonoBehaviour"] Type-.->Interface0["IFlexiMotionModifier"] click Interface0 "/flexi-motion/api/FlexiMotion.Modifiers/IFlexiMotionModifier" Type-.->Interface1["IOnValidate"] click Interface1 "/flexi-motion/api/FlexiMotion/IOnValidate" Type-.->Interface2["JobModifierGroup.IOnInitialize"] click Interface2 "/flexi-motion/api/FlexiMotion.Modifiers/IOnInitialize" Type-.->Interface3["JobModifierGroup.IOnUpdate"] click Interface3 "/flexi-motion/api/FlexiMotion.Modifiers/IOnUpdate" Type["AccelerationModifier"] class Type type-node Derived0["WindModifier"]-->Type click Derived0 "/flexi-motion/api/FlexiMotion.Modifiers/WindModifier"

Syntax

[AddComponentMenu(FMStrings.ModifiersMenuPrefix + "Acceleration Modifier")]
[HelpURL(FMStrings.DocsURLs.ModifiersAPIDocumentation + "/" + nameof(AccelerationModifier))]
public class AccelerationModifier : FlexiMotionModifier, IFlexiMotionModifier, IOnValidate, 
    JobModifierGroup.IOnInitialize, JobModifierGroup.IOnUpdate

Attributes

Type Description
AddComponentMenu
HelpURLAttribute

Fields

Name Constant Value Summary
ExecutionTime 100
Execute fairly early.
static
Magnitude 0.01
A multiplier for the amount of velocity applied.
static
TargetFieldName _Target
The name of the serialized backing field of FlexiMotion.Modifiers.FlexiMotionModifier.Target.
Inherited from FlexiMotionModifier
static

Properties

Name Value Summary
Acceleration Vector3
[UnityEngine.SerializeField] The amount of acceleration to apply every frame.
DeltaTime float
The FlexiMotion.FlexiMotionRuntime.DeltaTime.
Inherited from FlexiMotionModifier
Job Float3OffsetJob
The job used to execute the acceleration.
Target FlexiMotionComponent
Inherited from FlexiMotionModifier

Methods

Name Value Summary
Disable(JobModifierGroup) bool
Registers this modifier in the given FlexiMotion.Modifiers.JobModifierGroup.
Enable(JobModifierGroup) void
Registers this modifier in the given FlexiMotion.Modifiers.JobModifierGroup.
GetUsedBones() IEnumerable<Transform>
Returns the objects that are used by this modifier.
Inherited from FlexiMotionModifier
OnDisable() void
Calls FlexiMotion.Modifiers.FlexiMotionModifier.Disable(FlexiMotion.Modifiers.JobModifierGroup) if the FlexiMotion.Modifiers.FlexiMotionModifier.Target is set.
Inherited from FlexiMotionModifier
OnEnable() void
Calls FlexiMotion.Modifiers.FlexiMotionModifier.Enable(FlexiMotion.Modifiers.JobModifierGroup) if the FlexiMotion.Modifiers.FlexiMotionModifier.Target is set.
Inherited from FlexiMotionModifier
OnInitialize(JobHandle) JobHandle
A job modifier which runs when the simulation is initialized.
OnUpdate(JobHandle) JobHandle
A job modifier which runs after each iteration of an update.
OnValidate() void
Tries to find a FlexiMotion.Modifiers.FlexiMotionModifier.Target if none was assigned.
Inherited from FlexiMotionModifier
SchedulePosition(float3, JobHandle) JobHandle
Schedules the FlexiMotion.Modifiers.AccelerationModifier.Job to move its positions.
ScheduleVelocity(float3, JobHandle) JobHandle
Schedules the FlexiMotion.Modifiers.AccelerationModifier.Job to add to its velocities.

Extension Methods

Name Value Summary
LogTemp<AccelerationModifier>(Object) T
Debug.Log(message, context) with an [System.ObsoleteAttribute] warning so you remember to remove any calls.
SafeGetHashCode<AccelerationModifier>() int
Uses System.Collections.Generic.EqualityComparer`1.Default to get a hash code.