Vector3 .normalise() bug?

What it says on the tin: a place to discuss proposed new features.
mude
Halfling
Posts: 47
Joined: Tue Dec 21, 2010 1:46 pm

Vector3 .normalise() bug?

Post by mude »

n1 = ((v2-v1).crossProduct(v3-v1)).normalise();

return me a vector where all the values are the same, bt they aren't in the original vector.

I normalized the vector myself and it works
bstone
OGRE Expert User
OGRE Expert User
Posts: 1920
Joined: Sun Feb 19, 2012 9:24 pm
Location: Russia
x 201

Re: Vector3 .normalise() bug?

Post by bstone »

normalise() updates the vector and returns vector's length before the normalization. You should use normalisedCopy() if you want a normalized copy instead.