Merge branch 'master' of gitorious.org:fg/fgdata into Work
This commit is contained in:
commit
8086d9bf8d
1 changed files with 17 additions and 0 deletions
|
@ -12,6 +12,8 @@
|
|||
# Global API. Automatically selects the right walker for the current view.
|
||||
|
||||
# NOTE: Coordinates are always 3 component lists: [x, y, z].
|
||||
# The coordinate system is the same as the main 3d model one.
|
||||
# X - back, Y - right and Z - up.
|
||||
|
||||
# Set the forward speed of the active walker.
|
||||
# speed - walker speed in m/sec
|
||||
|
@ -39,6 +41,17 @@ var side_step = func (speed) {
|
|||
}
|
||||
}
|
||||
|
||||
# Get the currently active walker.
|
||||
# Returns the active walker object or nil otherwise.
|
||||
var active_walker = func {
|
||||
var cv = view.current.getPath();
|
||||
if (contains(walkers, cv)) {
|
||||
return walkers[cv];
|
||||
} else {
|
||||
return nil;
|
||||
}
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# The walker class.
|
||||
# ==============================================================================
|
||||
|
@ -77,6 +90,10 @@ var side_step = func (speed) {
|
|||
# [19.5, 0.3, -8.85]);
|
||||
# var walker = walkview.walker.new("Passenger View", constraint);
|
||||
#
|
||||
# NOTES:
|
||||
# Currently there can only be one view manager per view so the
|
||||
# walk view should not have any other view manager.
|
||||
#
|
||||
var walker = {
|
||||
new : func (view_name, constraints = nil) {
|
||||
var obj = { parents : [walker] };
|
||||
|
|
Loading…
Reference in a new issue