Page 1 of 1

Vector.length - can only set int values?

Posted: Tue Oct 25, 2016 4:22 pm
by iPlayer
Hey there,

I've come across a fact that the Vector's length property only accepts integer values:
/src/core/modules/mathlib/mathlib.h#L47

Trying to do something like

Syntax: Select all

speed_cap = 32.0
velocity = player.velocity
velocity.length = speed_cap

raises Boost.Python.ArgumentError

Is this intended and I should change my plugin?

Re: Vector.length - can only set int values?

Posted: Tue Oct 25, 2016 5:01 pm
by Ayuto
Oops, you are right. It should be float. :grin:

Re: Vector.length - can only set int values?

Posted: Tue Oct 25, 2016 7:03 pm
by L'In20Cible
Fixed in 2315e41, thank you for reporting!