Quantcast
Channel: Bugs Latest Topics
Viewing all articles
Browse latest Browse all 760

Vector3.lerp is concatenating instead of adding

$
0
0

I'm using babylon 2.4 here.

I've providing position vectors to the Vector3.lerp function.  The result seems to be a string concatenation instead of arithmetic addition.

Below I'm just showing x, z coordinates because y is always constant

from: 2.000, 0.000  to: 2.400, 0.000
lerp percentage: 0.33589999999996506
lerped position: 2.0000.134359999999986, 0.0000
lerp percentage: 0.9552999999999884
lerped position: 2.0000.38211999999999524, 0.0000

so this is going from (2.0, 0.0) to (2.4, 0.0)

The 1st resulting lerp should be 2.134359999999986 but instead its 2.0000.134359999999986

 


Viewing all articles
Browse latest Browse all 760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>