jure / aframe-blink-controls

A teleport (blink with rotation) component for A-Frame
https://jure.github.io/aframe-blink-controls
MIT License
50 stars 17 forks source link

Calculate world normals for landing normal calculations #9

Closed jure closed 3 years ago

jure commented 3 years ago

Currently when calculating if the landing normal is within limits, we use the local normals of the object i.e. in object space. If an object is rotated this will be incorrect (e.g. if it's rotated by 90 deg on an axis, the normals will be off 90 deg on that axis as well - an intended 0 1 0 normal can be wrongly calculated as 0 0 1), so we need to calculate world normals. This PR fixes this.