rotateTo callback fails
by Aditya Kulkarni · in Torque Game Builder · 06/25/2010 (1:19 am) · 2 replies
If I have 30 or more objects, the callback starts to fail for 3-4 of them.
I basically want them to wobble so the user notices them easily. The code is simple, so I don't understand why it fails.
I basically want them to wobble so the user notices them easily. The code is simple, so I don't understand why it fails.
function wobbleIcon(%icon) {
%icon = %icon.getName();
if(isObject(%icon)) {
if(%icon.rotDir==1) {
%icon.rotateTo(25, 85, false, true);
%icon.rotDir = 0;
}
else {
%icon.rotateTo(-25, 85, false, true);
%icon.rotDir = 1;
}
}
}
function upgradeIcon::onRotationTarget(%this) {
wobbleIcon(%this);
//schedule(0,0,wobbleIcon,%this);
}
#2
06/25/2010 (11:22 pm)
Tried that already, doesn't work. Got around this by using an animation instead.
Torque 3D Owner Daniel Balmert
Default Studio Name
A schedule with 0 time is very unreliable.