### edited after realizing that damping in the .blend demo was not set to Zero! ###
Dear all,
maybe is just my inexperience or maybe I’ve missed something during the learning process, but I’ve got a huge problem with setAngularVelocity() and setLinearVelocity().
I can’t use this methods to set a GameObject angular or linear velocity to Zero (null vector).
Please see the .blend file attached
This behavior is preventing me to easily implement rudimentary control loops based on thresholds
Thank you agoose, I will look into that. In the meantime i’ve edited the .blend file in my previous post because I realized it was not showing my problem correctly.
You need at least a small amount on any of the axis. I suggest 0.0002 on Z as it has the least impact. Btw. you can do this with the MotionActuator too.
Ok guys, I was freacking out because I didn’t set damping to ZERO in the problem demo! Of course this caused all sorts of “strange” behaviors that i couldn’t understand. Now I’m back on track :evilgrin:
So, I’ve tried with angular and linear velocity attributes to, as suggested by agoose, but it didn’t work (please see attached)
You need at least a small amount on any of the axis. I suggest 0.0002 on Z as it has the least impact. Btw. you can do this with the MotionActuator too.
Does this mean it is NEVER possible to set velocities to Zero? No metter how?
This is really bad for me…
I’ve already thought about using very small velocity values, but this doesn’t fit my purpose very well. I really would like the object that is rotating to STOP if I tell it so…
I’m aware I could use Motion actuator, but this is not going to make any difference when trying to set velocity to null vector, isn’t it?
I’m sorry, that should have been tested in the previous post attachment, but I’ve picked the wrong file. Now it’s correct.
Anyway, it doesn’t work.
I’ve tested .worldAngularVelocity = [0,0,0] and not .worldLinearVelcoty = [0,0,0], but i don’t think this makes any difference (further confirmation coming soon)
Angular velocity is the rotation, it will stop it rotating.
I know! But it won’t!
own.worldAngularVelocity*=0
Not working either…
looks like a bug.
If not a bug, I would call this “something that needs to be changed”.
It’s pretty obvious that, eventually, someone will need to setAngularVelocity() to [0,0,0]. Unfortunately that’s me right now!
I tested with these versions: 2.71, 2.70a, 2.70, 2.65a, 2.57b. It seems that all versions have this bug with worldAngularVelocity. It might be a good idea to report this if not reported already.