feflow教程中的snap distance 在哪

ArcGIS Help 10.2 - Optimized Hot Spot Analysis (Spatial Statistics)
Given incident points or weighted features (points or polygons), creates a map of statistically significant hot and cold spots using the Getis-Ord Gi* statistic. It evaluates the characteristics of the input feature class to produce optimal results.
Illustration
This tool identifies statistically significant spatial clusters of high values (hot spots) and low values (cold spots). It automatically , identifies an , and corrects for both .
This tool interrogates your data in order to determine settings that will produce optimal hot spot analysis results.
If you want full control over these settings, use the
tool instead.
Note:Incident data are points representing events (crime, traffic accidents) or objects (trees, stores) where your focus is on presence or absence rather than some measured attribute associated with each point.
The computed settings used to produce optimal hot spot analysis results are reported in the .
The associated workflows and algorithms are explained in
.This tool creates a new Output Feature Class with a
and confidence level bin (Gi_Bin) for each feature in the Input Feature Class.
The Gi_Bin field identifies statistically significant hot and cold spots, corrected for
Features in the +/-3 bins (features with a Gi_Bin value of either +3 or -3) are statistically significant at the 99 perc features in the +/-2 bins reflect a 95 perc features in the +/-1 bins reflect a 90 perc and the clustering for features with 0 for the Gi_Bin field is not statistically significant.
The z-score and p-value fields do not reflect any kind of .
For more information on z-scores and p-values, see When the Input Feature Class is not projected (that is, when coordinates are given in degrees, minutes, and seconds) or when the
is set to a , distances are computed using chordal measurements.
Chordal distance measurements are used because they can be computed quickly and provide very good estimates of true geodesic distances, at least for points within about thirty degrees of each other.
Chordal distances are based on a sphere rather than the true oblate ellipsoid shape of the earth.
Given any two points on the earth's surface, the chordal distance between them is the length of a line, passing through the three dimensional earth, to connect those two points.
Chordal distances are reported in meters.
Caution:Be sure to
if your study area extends beyond 30 degrees.
Chordal distances are not a good estimate of geodesic distances beyond 30 degrees.The
Input Features may be points or polygons.
With polygons, an Analysis Field is required.If you provide an Analysis Field, it should contain a variety of values. The math for this statistic requires some variation in the var it cannot solve if all input values are 1, for example. With an Analysis Field, this tool is appropriate for all data (points or polygons) including sampled data.
In fact, this tool is effective and reliable even in cases where there is oversampling.
With lots of features (oversampling) the tool has more information to compute accurate and reliable results.
With few features (undersampling), the tool will still do all it can to produce accurate and reliable results, but there will be less information to work with.
Because the underlying Getis-Ord Gi* statistic used by this tool is asymptotically normal, even when the Analysis Field contains skewed data, results are reliable.With point data you will sometimes be interested in analyzing data values associated with each point feature and will consequently provide an Analysis Field.
In other cases you will only be interested in evaluating the spatial pattern (clustering) of the point locations or point incidents.
The decision to provide an Analysis Field or not will depend on the question you are asking.Analyzing point features with an Analysis Field allows you to answer questions like: Where do high and low values cluster?
The analysis field you select might represent: Counts (such as the number of traffic accidents at street intersections)Rates (such as city unemployment, where each city is represented by a point feature)Averages (such as the mean math test score among schools)Indices (such as a consumer satisfaction score for car dealerships across the country)Analyzing point features when there is no Analysis Field allows you to identify where point clustering is unusually (statistically significant) intense or sparse.
This type of analysis answers questions like: Where are there many points?
Where are there very few points?When you don't provide an Analysis Field the tool will aggregate your points in order to obtain point counts to use as an analysis field.
There are three possible aggregation schemes:For COUNT_INCIDENTS_WITHIN_FISHNET_POLYGONS, an
is computed and used to create a fishnet polygon mesh.
The fishnet is positioned over the incident points and the
points within each polygon cell are counted.
If no Bounding Polygons Defining Where Incidents Are Possible feature layer is provided, the fishnet cells with zero points are removed and only the remaining cells are analyzed.
When a bounding polygon feature layer is provided, all fishnet cells that fall within the bounding polygons are retained and analyzed.
The point counts for each polygon cell are used as the analysis field.
For COUNT_INCIDENTS_WITHIN_AGGREGATION_POLYGONS, you need to provide the
Polygons For Aggregating Incidents Into Counts feature layer.
The point incidents falling within each polygon will be counted and these polygons with their associated counts will then be analyzed. The COUNT_INCIDENTS_WITHIN_AGGREGATION_POLYGONS is an appropriate aggregation strategy when points are associated with administrative units such as tracts, counties, or school districts.
You might also use this option if you want the study area to remain fixed across multiple analyses to enhance making comparisons.For SNAP_NEARBY_INCIDENTS_TO_CREATE_WEIGHTED_POINTS, a
and used to aggregate nearby incident points.
Each aggregated point is given a count reflecting the number of incidents that were snapped together.
The aggregated points are then analyzed with the incident counts serving as the analysis field.
The SNAP_NEARBY_INCIDENTS_TO_CREATE_WEIGHTED_POINTS option is an appropriate aggregation strategy when you have many coincident, or nearly coincident, points and want to maintain aspects of the spatial pattern of the original point data.
In many cases you will want to try both SNAP_NEARBY_INCIDENTS_TO_CREATE_WEIGHTED_POINTS and COUNT_INCIDENTS_WITHIN_FISHNET_POLYGONS and see which result best reflects the spatial pattern of the original point data.
Fishnet solutions can artificially separate clusters of point incidents, but the output may be easier for some people to interpret than weighted point output.Caution:Analysis of point data without specifying an Analysis Field only makes sense when you have all known point incidents and when you can be confident there is no bias in the point distribution you are analyzing.
With sampled data you will almost always be including an Analysis Field (unless you are specifically interested in the spatial pattern of your sampling scheme).When you select COUNT_INCIDENTS_WITHIN_FISHNET_POLYGONS for the Incident Data Aggregation Method you may optionally provide a Bounding Polygons Defining Where Incidents Are Possible feature layer.
When no bounding polygons are provided, the tool cannot know if a location without an incident should be a zero to indicate that an incident is possible at that location, but didn't occur, or if the location should be removed from the analysis because incidents would never occur at that location.
Consequently, when no bounding polygons are provided, only fishnet cells with at least one incident are retained for analysis.
If this isn't the behavior you want, you can provide a Bounding Polygons Defining Where Incidents Are Possible feature layer to ensure that all locations within the bounding polygons are retained.
Fishnet cells with no underlying incidents will receive an incident count of zero.Any incidents falling outside the Bounding Polygons Defining Where Incidents Are Possible or the Polygons For Aggregating Incidents Into Counts will be excluded from analysis.If you have the ArcGIS Spatial Analyst extension you can choose to create a Density Surface of your point Input Features.
With point Input Features, the Density Surface parameter is enabled when you specify an Analysis Field or select the SNAP_NEARBY_INCIDENTS_TO_CREATE_WEIGHTED_POINTS for the Incident Data Aggregation Method.
The output Density Surface will be clipped to the
specified in the .
If no raster mask is specified, the output raster layer will be clipped to
a convex hull around the Input Features.
You should use the
tools if you want to identify space-time hot spots. More information about space-time cluster analysis is provided in the
Map layers can be used to define the Input Feature Class. When using a layer with a selection, only the selected features are included in the analysis.
When this tool runs in ArcMap, the Output Features are automatically added to the table of contents
with default rendering applied to the Gi_Bin field. The hot-to-cold rendering applied is defined by a layer file in &ArcGIS&/Desktop10.x/ArcToolbox/Templates/Layers. You can reapply the default rendering, if needed, by
the template layer symbology.
When using shapefiles, keep in mind that they cannot store null values. Tools or other procedures that create shapefiles from nonshapefile inputs may store or interpret null values as zero. In some cases, nulls are stored as very large negative values in shapefiles.
This can lead to unexpected results.
for more information.
SyntaxOptimizedHotSpotAnalysis_stats (Input_Features, Output_Features, {Analysis_Field}, {Incident_Data_Aggregation_Method}, {Bounding_Polygons_Defining_Where_Incidents_Are_Possible}, {Polygons_For_Aggregating_Incidents_Into_Counts}, {Density_Surface})ParameterExplanationData Type
Input_Features
The point or polygon feature class for which hot spot analysis will be performed.
Feature Layer
Output_Features
The output feature class to receive the z-score, p-value, and Gi_Bin results.
Feature Class
Analysis_Field(Optional)
The numeric field (number of incidents, crime rates, test scores, and so on) to be evaluated.
Incident_Data_Aggregation_Method(Optional)
The aggregation method to use to create weighted features for analysis from incident point data.
COUNT_INCIDENTS_WITHIN_FISHNET_POLYGONS —A fishnet polygon mesh will overlay the incident point data
and the number of incidents within each polygon cell will be counted.
If no bounding polygon is provided in the Bounding Polygons Defining Where Incidents Are Possible parameter, only cells with at least one incident will be
otherwise, all cells within the bounding polygons will be analyzed.COUNT_INCIDENTS_WITHIN_AGGREGATION_POLYGONS —You provide aggregation polygons to overlay the incident point data in the Polygons For Aggregating Incidents Into Counts parameter.
The incidents within each polygon are counted.SNAP_NEARBY_INCIDENTS_TO_CREATE_WEIGHTED_POINTS —Nearby incidents will be aggregated together to create a single weighted point.
The weight for each point is the number of aggregated incidents at that location.String
Bounding_Polygons_Defining_Where_Incidents_Are_Possible(Optional)
A polygon feature class defining where the incident Input Features could possibly occur.
Feature LayerPolygons_For_Aggregating_Incidents_Into_Counts(Optional)
The polygons to use to aggregate the incident Input Features in order to get an incident count for each polygon feature.
Feature Layer
Density_Surface(Optional)
output density surface of point input features.
This parameter is only enabled when Input Features are points and you have the ArcGIS Spatial Analyst extension.
The output surface created will be clipped to the raster analysis
specified in your environment settings.
If no raster mask is specified, the output raster layer will be clipped to
a convex hull of the input features.
Raster Dataset
Code Sample
OptimizedHotSpotAnalysis example 1 (Python window)
The following Python window script demonstrates how to use the OptimizedHotSpotAnalysis tool.
import arcpy
arcpy.env.workspace = r&C:\OHSA&
arcpy.OptimizedHotSpotAnalysis_stats(&911Count.shp&, &911OptimizedHotSpots.shp&, &#&, &SNAP_NEARBY_INCIDENTS_TO_CREATE_WEIGHTED_POINTS&, &#&, &#&, &calls911Surface.tif&)
OptimizedHotSpotAnalysis example 2 (stand-alone Python script)The following stand-alone Python script demonstrates how to use the OptimizedHotSpotAnalysis tool.# Analyze the spatial distribution of 911 calls in a metropolitan area
# Import system modules
import arcpy
# Set geoprocessor object property to overwrite existing output, by default
arcpy.overwriteOutput = True
# Local variables...
workspace = r&C:\OHSA\data.gdb&
# Set the current workspace (to avoid having to specify the full path to the feature classes each time)
arcpy.env.workspace = workspace
# Create a polygon that defines where incidents are possible
# Process: Minimum Bounding Geometry of 911 call data
arcpy.MinimumBoundingGeometry_management(&Calls911&, &Calls911_MBG&, &CONVEX_HULL&, &ALL&,
&#&, &NO_MBG_FIELDS&)
# Optimized Hot Spot Analysis of 911 call data using fishnet aggregation method with a bounding polygon of 911 call data
# Process: Optimized Hot Spot Analysis
ohsa = arcpy.OptimizedHotSpotAnalysis_stats(&Calls911&, &Calls911_ohsaFishnet&, &#&, &COUNT_INCIDENTS_WITHIN_FISHNET_POLYGONS&,
&Calls911_MBG&, &#&, &#&)
# If any error occurred when running the tool, print the messages
print arcpy.GetMessages()
Environments, , , , , , , , , , , , , , , , Feature geometry is projected to the Output Coordinate System prior to analysis. All mathematical computations are based on the Output Coordinate System spatial reference.
When the Output Coordinate System is based on degrees, minutes, and seconds, geodesic distances are estimated using chordal distances.
Related TopicsLicensing InformationArcGIS for Desktop Basic: YesArcGIS for Desktop Standard: YesArcGIS for Desktop Advanced: YesDoc:2.4/Manual/3D interaction/Transform Control/Snap to Mesh
Blender 2.4
Blender 2.4
From BlenderWiki
Mode: Edit or Object modes
Hotkey: ? Shift? Tab
Menu: Mesh/Object&>> Transform&>> Snap
Used in conjunction with Grab, Extrusion, Scale or Rotation modes, this tool allows you to snap objects (in Object mode) or vertices/edges/faces (in Edit mode, for meshes only currently) to a target vertex/edge/face.
Once the tool is activated you are ready to drag your element(s) to its(their) destination. Move your mouse pointer to the target where you want to snap to, hold down Ctrl, move your pointer to adjust (especially if your target is an edge or face).
When satisfied with the result, confirm with LMB
or ? Enter (as usual, you can cancel everything with a RMB
clic or by hitting Esc).
Snap Mode menu.
Closest: move the closest point of the selection to the target.
Center: move the current transformation center to the target. Can be used with 3D cursor to snap with an offset.
Median: move the median of the selection to the target.
Active: move the active element (vertex in Edit mode, object in Object mode) to the target.
Snap Element menu.
Vertex: the target will be a vertex.
Edge: the target will be an edge.
Face: the target will be a face.
Snapping to volume.
Volume: the target will be a whole mesh volume – the first one found below the mouse cursor. Unlike the other ones, this option controls (in the current view space) the depth (i.e. Z-coordinates in view space) of the transformed element, which is placed at the current “volume center”. This “volume center” can be determined in two different ways, depending on the new “monkey” button that shows up:
When disable, the snapped element will be at the mid-distance between the two first faces found below the mouse cursor.
When enabled, the snapped element will be at the mid-distance between the nearest and farest faces found below the mouse cursor.
I’m not sure how exactly the “volume” target works – so if you know more or can explain it better, please edit this part (or contact me…).-- 13:32, 11 May 2010 (UTC)
The following shows different Element and Mode options:
Snap align.
Align Object’s Z axis with the normal of the target element.
Normals are interpolated between the two vertex normals when snapping to edges, otherwise, face normals and vertex normals are directly used.
Only works with Translations (Grab) done in Object mode.
The following video shows a tree being snapped and aligned on a ground mesh:
Unversioned
Blender 2.6
Blender 2.5
Blender 2.4
Introduction
What is Blender?
Installing Blender
The Interface
Your First Animation
The Vital Functions
Setting Preferences
Interaction in 3D
Introduction
Navigation
Sketch in 3D Space
Transformations
Transform Control
Snap to Mesh
Data System and Files
Blender's Data System
File operations
Introduction
Mesh Objects
Curve Objects
Surface Objects
Text Objects
Meta Objects
Empty Objects
Group Objects
Modifiers and Deformation
Introduction
Introduction
Volumetric Lights
Scene Light
Introduction
Properties
Node Materials
Vertex Paint
Introduction
Texture Types
Texture Painting
World and Ambient Effects
Ambient Effects
Introduction
Constraints
Introduction
Transform Constraints
Tracking Constraints
Relationship Constraints
Introduction
Animation Editors
Animation Techniques
Physical Simulation
Introduction
Using the Game Engine
Introduction
Effects and Post Processing
Render Performance
External Render Engines
Compositing with nodes
Composite Nodes
Composite Node types
Editing Sequences
Introduction
The sequencer
Extending Blender
Introduction
Python Scripting
Python Scripts
Game Engine
Introduction
The Logic Editor
Controllers
Python API
Various resources
(BSoD Tutorial)
This page has been accessed 42,501 times.From Unify Community Wiki
This is an external link because the wiki seems to be preventing me from uploading packages, despite listing unityPackage as a supported filetype. Please e-mail me if this is fixed or if there's a trick to it.
Note: The author of this page moved its old contents to .
The Spline Controller scripts above allow users to create pre-defined spline paths for objects to follow, either automatically at set speeds, or responding to keyboard and mouse input.
The spline is defined by a connected collection of GameObjects which define a set of positions and orientations for a Controller script to follow.
For automatic followers, each node defines an action, which will be one of the following:
Continue (default)
The actions are pretty self-explanatory, and can be set for each node in the Unity Editor.
The package also includes editor scripts to override the default inspector for the Spline object (which contains the nodes) and each SplineNode.
The Spline inspector adds some buttons to affect every node in the spline, such as setting parameters and toggling the display of some "helper" models, which wants to be hidden when the user isn't manipulating the spline.
There are many improvements still to be made:
Non-linear position/rotation/speed interpolation
Can you do 3D Bezier interpretation?
If not, I'll probably implement something like the interpolation used in the .
If you want a smooth follower (without player control), check that page out.
Re-integration of "Gravity" spline
The original design of this controller involved a second spline which the character would refer to for it's definition of world space while in the air.
In other words, the spline defines "up" and "forward" depending on the character's current position.
This feature was abandoned for convenience but important vestigial functions have remained, and will be put back into use in time.
Better "drawing" controls
The add next/prev buttons are a temporary convenience and will eventually make way to a "brush"-like interface.
I'll see how easy this is to do in-editor, because it would be inconvenient to have to create splines in-game for many reasons.
The Spline Controller
The involved classes are described in detail below, I won't bother to elaborate certain details.
Please refer to the information below if any specifics are confusing.
You'll want to use the provided prefab to get started, as setting up a spline node by hand is a bit tedious.
Select one of the two nodes created by default, and click "Add Next" or "Add Previous" to create more.
You'll have to position each node as you like manually.
Rotating the node will set the rotation the follower will take upon reaching it.
If you enable Rotation Freedom you can rotate the node however you like.
To remove nodes from the spline, simply delete them.
They'll take their collider with them, and all links will be respected, via the OnDestroy function in SplineNode.
Add the SplineController script to the object you would like to follow the spline.
Add a rigidbody (and collider if you want it) to the object, and turn off it's gravity.
If this will be keyboard controlled, you might want to set it's collision mode to Continuous Dynamic since it will be flying around quite a bit.
Further setup of the controller will depend on what type you want
"Auto" mode
Drag the Spline object into the Current Spline field
"Mouse" mode
Mouse mode assumes that something else, presumably the mouse, is setting the position of the object
Set the Snap Distance to choose how close (above) the spline the object has to be before it attaches to the spline
Set the hover offset to specify where, in relation to the position along the spline, the object should be
"Keyboard" mode
After setting the Mode to Keyboard, if you're happy with the default settings (which make good sense for a character about 2 units tall) you're done!
I'll admit my comments are sparse (this will get better over time :) so here's a rundown on the important classes in the package.
The spline goes on the parent object to the whole system.
As an aside, the controller will set this as its parent when it lands on a spline.
For creating an auto-controller, I advise you make the controller a child of the spline, so that the spline (and its nodes) cannot be "pulled out from under" the controller, as you will see happen if it is setup otherwise.
You will also find it useful to take advantage of the utilities provided by its inspector while manipulating the splines.
The controller will also use a reference to this object for various purposes.
The Spline Inspector
The first node in the spline.
The Add buttons and SplineNode.OnDestroy() do a good job of keeping these parameters set correctly, but if you're having trouble it wouldn't hurt to verify that they're correct manually. Click on the SplineNode reference to highlight it in the Heirarchy.
The next spline in the chain. (See Previous)
The previous spline in the chain.
If for whatever reason, you want to chain splines together, you can.
This can be a finicky process and should be avoided where possible, but followers will check for a next or previous spline before running off the end of their current spline.
If a next or previous spline is found, the second or penultimate node are chosen for the next or previous node, respectively.
As an example, a follower going "forward," upon passing the a node which has no "Next" (see below) will then check the Spline's "Next" field.
If a next spline is found, the first node of that spline (begin) is chosen as the current node, the spline is set as the current spline and the follower continues as normal.
Connected splines are meant to "overlap"--the end of the first either in the same location as or "behind" the beginning of the second--for a variety of reasons.
For one, the colliders (discussed below) must span any "walkable" area for followers to land on them.
A set of connected splines which do not overlap will behave as if not connected.
The character will simply fall off of the spline it was following when reaching the beginning or end.
Global Collider Type
This determines which type of collider will be applied when clicking "Reset Colliders" below. (See SplineNode.Collider Type)
The length of the spline. Again, this is more-or-less handled by the scripts, but it's possible for length to be wrong.
If you're having trouble, check that this is correct.
Set Pause Time
The pause time which will be used when clicking "Set Pause Time" below.
The Speed which will be used when clicking "Set Pause Time" below.
Clicking this will set the speed of every node in the spline to the "Set speed" value above.
Set Pause Time
Clicking this will set the pause time of every node in the spline to the "Set pause time" value above.
Toggle handles
This will toggle the display of rotation handles for all nodes.
The rotation handles are meant to resemble the rotation handles of any 3D package, with an added arrow indicating the "up" direction of the node.
The rotation handles themselves are a child object whose hideflags prevent you from selecting or editing them.
I also got the colors wrong.
I'll fix this eventually. Sorry :)
Togggle nodes
This will toggle the display of node meshes for all nodes.
The mesh will change to indicate the node's action, and provides an object to click on in the editor.
Global Collider Radius
This slider sets the radius of all colliders in the spline. (See SplineNode.Collider Radius)
Toggle Colliders
Toggles the display of the cube gizmo approximating each collider
Reset Colliders
Remakes all colliders on the spline.
Use this the display mode of the colliders is out of sync, or if for whatever reason you're missing one.
The SplineNode Inspector
NOT AN INDEX -- This is a variable I included for debug purposes.
Collider Radius
The radius (or width) of the collider.
This will have a different effect depending on the type of collider. (See Collider Type) Don't set this variable here, because when you select the Spline and the Inspector is rendered, the inspector script will reset all collider radii to the global value.
In retrospect, this should be "action" or something.
Defines what an auto-follower will do upon reaching this node.
The options are:
Just keep going
Pause for a certain amount of time. (See Pause Time)
Stop indefinitely, or until the user or a script restarts the following
Pause and reverse direction.
If no pause is desired, set Pause Time to 0
Collider Type
What type the span collider can be. This collider exists to be found by the follower's prediction linecasts so that the follower can land on a spline.
It is a trigger, and thus doesn't interfere with physics colliders.
The types are (same as PrimitiveType)
A sphere collider would be pretty silly. Currently, setting Collider Type to sphere will get it reset to Capsule.
This creates a capsule collider with a radius of Collider Radius.
The center of each cap is positioned at the begin/end nodes of the span, so that the collider caps will overlap perfectly.
There's no cylinder collider.
This also resets to Capsule.
Cubes would also be a bit weird.
This setting defaults to plane (which is actually a cube collider)
A plane collider actually isn't a plane.
For a few reasons, it's better to use a box collider here, which for our purposes has a height of 0.1.
This will be a settable variable in the next revision.
Collider Freedom
Don't constrain the node's collider's position, rotation, and size, as is the default behavior.
If this is false, each collider is positioned exactly between two nodes, is scaled to be as long as their span in the forward direction, and rotated to "look at" the second node. If it is true, this procedure is ignored, and you can manipulate the collider however you please.
Rotation Freedom
Don't constrain the node's rotation.
If this is true, the node will always "look at" the next node (free if there is no next node).
The node can still be rotated 360 degrees around the forward (look) axis, but will always point forward to the next node.
If this is false, you can rotate the node however you want.
Hide Handles
If true, don't display the handle object.
This is toggled by the "Toggle Handles" button above.
Pause Time
The length of time to wait when pausing or reversing.
As a note, I've found it is useful, when using an animated follower, to use animation length as pause time.
To do this, set the Pause Time to infinity (this can be done by just typing "Infinity" for its value), and use your own controller logic to set the speed back to the node's speed when the animation has finished.
You could also use a stop node instead of setting time = Infinity, but I like the node is marked as "pause" so it's clear what will happen.
The speed which the follower will be set to upon hitting this node.
Use the above "Set Speed" to normalize this across the spline.
Add Offset
The length of offset (to left or right) when a next/previous node is added to this node.
From Previous
Whether this node's action will be done on a controller coming from the previous node. (See From Next)
Whether this node's action will be done on a controller coming from the next node. This lets a follower "bypass" the node when travelling in a certain direction, giving you more control of the behavior of "auto" followers.
Obviously, this has no impact on keyboard or mouse followers.
The next node in the spline (See Previous)
The previous node in the spline.
These connections are the only way that the spline is connected (and thus defined).
If the spline were a data structure, it would be a doubly-linked list.
Span Collider
The reference to the collider that spans the gap between this node and the next.
The collider is referenced in the "left" node, meaning there will be one in the beginning node, and not in the end node.
The collider objects themselves exist as a direct child of the Spline. (See Collider Type, above)
The reference to the spline, which will generally but not necessarily be the node's parent
An incidental Boolean to be set when the parent is destroyed, so as to avoid an error on destroying the span collider twice. (will be hidden from inspector)
Reference to the object which provides the mesh and material for the Continue nodes
Reference to the object which provides the mesh and material for the Pause nodes
Reference to the object which provides the mesh and material for Stop nodes
Reference to the object which provides the mesh and material for Reverse nodes
Next Arrow
Reference to the object which provides the mesh and material for the next arrow
Prev Arrow
Reference to the object which provides the mesh and material for the previous arrow
Reference to the object which provides the mesh and material for the rotation handles
The SplineController Inspector
The SplineController Inspector, Keyboard mode
The SplineController Inspector, Auto mode
This boolean encapuslates everything in the FixedUpdate method of SplineController.
In other words, if Go is true, the follower doesn't move on its own accord.
I might remove this in light of using the "enable" field of the component instead.
Rev Orientation
If this is true, the model will be rotated (in Y) by 180 degrees, so that it will face backwards as it moves.
Do this if the model faces the wrong direction.
The controller will orient the model so it "looks forward" along its forward z vector.
Current Spline
The spline to which the controller is currently attached.
For keyboard or mouse followers, this should remain unset.
If you would like to set up an automatic follower, you have a choice to make.
If no Current Spline is set, the follower will fall down until it hits a spline (forever, if it has to).
If you want a follower to start on-spline, set this variable in the editor before the game runs.
Gravity Spline
This variable is ignored for all intents and purposes.
It's a vestige of when the controller used a spline to determine its local space while not attached to a spline (where to face, where to fall), but its use hasn't been tested recently.
It will be included in future revisions.
Gravity Force
The force amount applied to gravity, while the follower isn't attached to a spline.
If no gravity spline is set, the controller falls relative to Vector3.up (so a negative value will fall down)
Loose Follow
This variable has a subtle effect.
The difference is between whether the follower will "snap" to the spline, or simply head toward it given its current position.
There will probably be changes regarding its affect in future revisions.
Snap Distance
This variable belongs solely to Mouse mode followers, now, since it is automatically set with Keyboard and Auto followers.
In a mouse follower, Snap distance is used for the length of the linecast along Vector3.down, which searches for the spline nearest the follower.
In Keyboard and Auto followers, the snap distance is a threshold given to the
algorithm which determines where along the spline the controller has landed.
In practice, this value is set automatically to ensure the right position is found.
This will be discussed below regarding the controller's "workings."
What mode the follower will assume.
There are three options:
As stated above, mouse node assumes that another script is in control of the follwer's position.
Strictly speaking, Mouse mode disables the controller, but here is it's purpose: Whatever script moves the object should call SplineController.FindNextSplineMouse every frame (or whenever position is updated).
The function takes two parameters: an Vector3 for the intended position, and an out Vector3 for the position at which it should be placed.
Thus, your placement function should look like this
MoveObject(Vector3 position, GameObject obj){
SplineController sc = obj.GetComponent&SplineController&();
Vector3 pos;
if(sc){
if(sc.findNextSplineMouse(out pos, data.drag.point))
sc.transform.position = pos + sc.hoverOffset;
obj.transform.position = position;
} else {
obj.transform.position = position;
The function returns a boolean, equal to whether or not the controller is in range of a spline.
This is determined by casting a line downward from the controller's position, with a length of Snap Distance.
The controller object will be placed at the position along the spline closest to the ray, offset by the Hover Offset vector.
Thus, as you move it around, when the position is above the spline, the object will be placed at a consistent offset, along the spline.
Hover Offset
The offset by which the controller will hover.
This means the forward/backward progress will be determined by keyboard input, namely according to the default "Horizontal" axis.
By default, the controller will fall straight down, casting rays along it's forecasted position (See Prediction Length/Step).
As soon as it falls through a spline, it will attach.
While falling, the left/right arrow keys will cause an acceleration (equal to AirForce) along Vector3.Left/Right (until Gravity Spline functionality is replaced).
When attached to the spline, the acceleration will be applied along the forward direction of GroundNode (See GroundNode).
The amount of force applied so the controller in response to the "Horizontal" axis, when falling through the air.
Max Air Speed
The speed above which key control will not apply acceleration, when falling through the air.
The amount of force applied so the controller in response to the "Horizontal" axis, when attached to a spline.
Max Run Speed
The speed above which key control will not apply acceleration, when attached to a spline.
Stop Force
The force used to stop the controller when moving in one direction while the user presses the button to move in the other.
Jump Velocity
The speed at which the controller will move upward when space bar is pressed.
Initial Speed
The speed at which the controller will move at the start of the game.
Go In Reverse
Whether the controller will start moving "left" toward the previous nodes.
Initial Speed
The speed at which the controller will move at the start of the game.
Opening this foldout will show the default inspector, revealing a few more parameters.
Quick Links

我要回帖

更多关于 feflow6.0破解版 的文章

 

随机推荐