mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-09 12:42:11 +00:00
Fix for broken physics in exteriors (Fixes #1446)
The wrong function was being used to check the distance between old and new positions. It took the length of the vectors into account, which makes no sense for positions. The issue was only observed in exteriors, since most interiors are relatively close to the origin.
This commit is contained in:
parent
c23e9e03fd
commit
013916fca3
@ -304,7 +304,7 @@ namespace MWWorld
|
||||
continue; // velocity updated, calculate nextpos again
|
||||
}
|
||||
|
||||
if(!newPosition.positionCloses(nextpos, 0.00000001))
|
||||
if(newPosition.squaredDistance(nextpos) > 0.00000001*0.00000001)
|
||||
{
|
||||
// trace to where character would go if there were no obstructions
|
||||
tracer.doTrace(colobj, newPosition, nextpos, engine);
|
||||
|
Loading…
Reference in New Issue
Block a user