I now seem to be having another similar, perhaps even related, issue, here's the logic . . . .
. . .
1) When a key is pressed (or the actor is touched, or an attribute equals a certain value, or any trigger whatsoever . . . )
2) Then change the angular velocity to 100
3) Otherwise Interpolate the angular velocity to 0 over 2 seconds
. . .
Which looks like this . . . . . .
. . .
I want to be able to rotate an object, and when I release the key (or button, or the attribute that triggers it becomes false - etc) I want the object's rotation (via angular velocity) to slowly settle to a stop.
The problem is it doesn't work - very occasionally, after hitting refresh 10 or 15 times, it might work, but most of the time it just moves a tiny bit (a degree or two) and then stops.
@Socks said:
Cheers for checking . Yes, I also found that using Rotate instead of 'change angular velocity' made no difference, it still wouldn't work.
Maybe a change attribute with the formula for Interpolate in the expression editor?
@Socks I tried something similar to that as well didn't work. Their must be a big change attribute bug because I have a had a few things not work that should have.
This is a different thing than the the original bug in this thread. In this case the interpolate behavior is acting as designed. (It won't release the interpolation until it reaches its goal and/or duration.)
You will need to find a way to turn off the interpolation behavior to get this to work.
@Socks you can use Angular Drag to slow down the actor... Assuming you are okay with using physics and you don't need it to be exactly like your video.
@RThurman said:
This is a different thing than the the original bug in this thread. In this case the interpolate behavior is acting as designed. (It won't release the interpolation until it reaches its goal and/or duration.)
You will need to find a way to turn off the interpolation behavior to get this to work.
@RondoRocket said:
Socks you can use Angular Drag to slow down the actor... Assuming you are okay with using physics and you don't need it to be exactly like your video.
Yes, I think one of the first alternative I tried was Angular Drag - but I had a few issues with it (the example I've given above is a stripped down and simplified version of the issue).
I copied (and double checked) all the code, that doesn't seem to work for me - it works sometimes, other times it stops working after one or two presses of the space bar . . ?
@Socks said:
Yes, I think one of the first alternative I tried was Angular Drag - but I had a few issues with it (the example I've given above is a stripped down and simplified version of the issue).
Yeah, I think my version using Angular Drag was identical - I can't remember quite what the issue was (I've tried so many different methods - they are all now merging into one in my memory !) - I think it had something to do with the fact that I have left and right rotation (CW and CCW) controls - and there was an issue ! Anyhow, I'll give it another shot, in theory it should work, cheers for the help.
@scuurpro said:
socks Heres my code I maybe I did something and didn't realize it.
Yeah, that's exhibiting the same issues, try starting the rotation, then as it is still going - or settling down - hit the same key again (this is a game control that will be rapidly hit) - it goes all glitchy !! Like RThurman pointed out, the Interpolate needs to complete its interpolation before you can do anything else.
@socks This one was easy fella …. Don't know if you know or not but basically there's a magic formula that works for all … AAA*sin( self.Time *BBB)+CCC … You're welcome
@beefy_clyro said:
socks This one was easy fella …. Don't know if you know or not but basically there's a magic formula that works for all … AAA*sin( self.Time *BBB)+CCC … You're welcome
Lol.
Believe me, if I could shoehorn it in there I would . . . . .
@beefy_clyro said:
socks This one was easy fella …. Don't know if you know or not but basically there's a magic formula that works for all … AAA*sin( self.Time *BBB)+CCC … You're welcome
This is probably a slight thread hijack. But I think it might be useful in resolving the two 'bugs' mentioned in this thread.
@Socks, your famous equation mentioned by @beefy_clyro is actually a formula for doing interpolations. Elsewhere, you have demonstrated that an actor can have cyclical behaviors of all sorts by using a the sin() function in this equation:
AAA*sin(Time*BBB)+CCC
Because of the sin() function, the actor interpolates an attribute (like width, angle, position, or color) around and around in a circular pattern.
Think about it. This equation is an interpolation. But it keeps going because there is not timer to turn it off. And it keeps repeating in a circular fashion because its uses the sin() function.
The only thing that makes it different from the behavior that GameSalad provides, is that the GS behavior has a timer (the duration) built into it.
Attached is a file that shows the two 'bugs' described in this thread, But, instead of using the interpolate behavior, they are re-created using using a variant of the famous "Socks' Equation". Here is the form of the equation used in the attached file:
AAA = range
BBB = duration
CCC = starting value
AAA*(Time*(1/BBB))+CCC
Look familiar? Only two little changes from the original equation and you have a linear interpolation!
@RThurman@ForumNinja (See RThurman post above) I have noticed this too, when I come back to a thread my upload is not visible. When I upload again it the original upload is visible again along with the new upload. Strange behaviour.
ForumNinjaKey Master, Head Chef, Member, PROPosts: 554
@colander That IS strange. I haven't had it happen to me personally, but I may shoot a message over to Vanilla to see if they know of any issues like this.
Comments
If your still having trouble trying interpolating it back in 0 seconds.
@RondoRocket @BBEnk @jamie_c @timolapre1998 @LumpApps @natzuur @StormyStudio @RThurman @Armelline (and anyone else who has thrown in their 2¢ (or 0.014 €)
I now seem to be having another similar, perhaps even related, issue, here's the logic . . . .
. . .
1) When a key is pressed (or the actor is touched, or an attribute equals a certain value, or any trigger whatsoever . . . )
2) Then change the angular velocity to 100
3) Otherwise Interpolate the angular velocity to 0 over 2 seconds
. . .
Which looks like this . . . . . .
. . .
I want to be able to rotate an object, and when I release the key (or button, or the attribute that triggers it becomes false - etc) I want the object's rotation (via angular velocity) to slowly settle to a stop.
The problem is it doesn't work - very occasionally, after hitting refresh 10 or 15 times, it might work, but most of the time it just moves a tiny bit (a degree or two) and then stops.
Anyone got any useful insights . . . . ?
(I'll make a video and post it in a minute).
Video . . .
@socks I got the same problem as you did when I tried. Also did the same thing when I used both rotate behaviors
Cheers for checking . Yes, I also found that using Rotate instead of 'change angular velocity' made no difference, it still wouldn't work.
Maybe a change attribute with the formula for Interpolate in the expression editor?
I tried that, no luck, it still won't work . . . .
@Socks I tried something similar to that as well didn't work. Their must be a big change attribute bug because I have a had a few things not work that should have.
@Socks
It rotates with this method I am not sure that it would come to a gradual stop. When you use interpolate it freezes for 2 seconds.
This is a different thing than the the original bug in this thread. In this case the interpolate behavior is acting as designed. (It won't release the interpolation until it reaches its goal and/or duration.)
You will need to find a way to turn off the interpolation behavior to get this to work.
@Socks you can use Angular Drag to slow down the actor... Assuming you are okay with using physics and you don't need it to be exactly like your video.
Twitter:rondorocket
Web: rondorocket.com
@Socks I got it to work
Yes, that makes sense ! Thanks.
Yes, I think one of the first alternative I tried was Angular Drag - but I had a few issues with it (the example I've given above is a stripped down and simplified version of the issue).
Cheers for the help.
I copied (and double checked) all the code, that doesn't seem to work for me - it works sometimes, other times it stops working after one or two presses of the space bar . . ?
You had a problem with this?
Twitter:rondorocket
Web: rondorocket.com
@socks Heres my code I maybe I did something and didn't realize it.
Yeah, I think my version using Angular Drag was identical - I can't remember quite what the issue was (I've tried so many different methods - they are all now merging into one in my memory !) - I think it had something to do with the fact that I have left and right rotation (CW and CCW) controls - and there was an issue ! Anyhow, I'll give it another shot, in theory it should work, cheers for the help.
Yeah, that's exhibiting the same issues, try starting the rotation, then as it is still going - or settling down - hit the same key again (this is a game control that will be rapidly hit) - it goes all glitchy !! Like RThurman pointed out, the Interpolate needs to complete its interpolation before you can do anything else.
@socks This one was easy fella …. Don't know if you know or not but basically there's a magic formula that works for all … AAA*sin( self.Time *BBB)+CCC … You're welcome
Lol.
Believe me, if I could shoehorn it in there I would . . . . .
Um.... that is the formula for interpolations. You can use it! But it will give an ease-out interpolation, rather than the linear one you are after.
This is probably a slight thread hijack. But I think it might be useful in resolving the two 'bugs' mentioned in this thread.
@Socks, your famous equation mentioned by @beefy_clyro is actually a formula for doing interpolations. Elsewhere, you have demonstrated that an actor can have cyclical behaviors of all sorts by using a the sin() function in this equation:
AAA*sin(Time*BBB)+CCC
Because of the sin() function, the actor interpolates an attribute (like width, angle, position, or color) around and around in a circular pattern.
Think about it. This equation is an interpolation. But it keeps going because there is not timer to turn it off. And it keeps repeating in a circular fashion because its uses the sin() function.
The only thing that makes it different from the behavior that GameSalad provides, is that the GS behavior has a timer (the duration) built into it.
Attached is a file that shows the two 'bugs' described in this thread, But, instead of using the interpolate behavior, they are re-created using using a variant of the famous "Socks' Equation". Here is the form of the equation used in the attached file:
Look familiar? Only two little changes from the original equation and you have a linear interpolation!
Cool stuff!
(Ahem... Sorry for the hijack.)
You've not attached anything, but it'd good to see what you've come up with ! What I have at the moment is not ideal, any cool ideas accepted !!
Strange... It was there a minute ago. Lets try again.
Edit -- Now its back. On both posts. Go figure!
Very nice, cheers for sharing that, I'm sure it'll come in useful at some stage.
@RThurman @ForumNinja (See RThurman post above) I have noticed this too, when I come back to a thread my upload is not visible. When I upload again it the original upload is visible again along with the new upload. Strange behaviour.
Universal Binary Template - Universal Binary Template Instructions Rev 4 (Short) - Custom Score Display Template
@colander That IS strange. I haven't had it happen to me personally, but I may shoot a message over to Vanilla to see if they know of any issues like this.