Skip to content

Commit 204cee3

Browse files
committed
(fix): resolve simulator region handling bugs from refactor
- b475547 caused these bugs - guess I never tested the Simulator after the refactor?? could've sworn I did.... - these seem like artifacts maybe from a mixed up rebase/stash or something as they're what I wrote before I was sure what the regionsInterface would look like :/
1 parent b7582cb commit 204cee3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

static/js/simulator/physijs/poseHandler.litcoffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Gets the current region of the car
107107
xpos = car.body.position.x
108108
ypos = car.body.position.z
109109
currentRegion = regionInterface.getRegion(regionFile, xpos, ypos)
110-
return currentPosition
110+
return currentRegion
111111
112112
Gets the target point to move to
113113

static/js/simulator/regionInterface.litcoffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Given a region, get the midpoint of the transition from the current region to it
4747

4848
getTransition = (regionFile, currentRegion, nextRegion) ->
4949
regionToName = nextRegion.name
50-
regionFromName = regionFile.Regions[getRegion()].name
50+
regionFromName = regionFile.Regions[currentRegion].name
5151
#console.log('regionFrom: ' + regionFromName + ' regionTo: ' + regionToName)
5252
# get correct transition array, could be ordered either way
5353
transition = if !regionFile.Transitions[regionFromName]? or !regionFile.Transitions[regionFromName][regionToName]?

0 commit comments

Comments
 (0)