Is there a work around for the behaviour Move To?
MillionairApps
Member Posts: 110
Hello all
I was playing around, doing some advance stuff, and I notice the behaviour Move To doesn't work 2/10 times.
Is there an alternative to this? Without using interpolate, since interpolate can not be adjusted while in motion.
An actor moves down to position.y of 250 from 400 at a speed of 500.
Thanks
I was playing around, doing some advance stuff, and I notice the behaviour Move To doesn't work 2/10 times.
Is there an alternative to this? Without using interpolate, since interpolate can not be adjusted while in motion.
An actor moves down to position.y of 250 from 400 at a speed of 500.
Thanks
Comments
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
I remember reading that cause there are decimals, sometimes it doesn't get it exact and therefore so keeps going?
When self.position.y is greater than position.needed then move to ....... Uncheck run to completion.
So far nothing is going wrong.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Normally interpolate is set to carry on until it has completed is journey
You can however affect Interpolate when in motion with the correct setup... I'd need to dig out my old project to remind myself, but essentially if you link the 'time' to the 'distance between self position and the given destination' so the actor always travels at your prefered speed, then you can change an interpolate at any time by running the interpolate rule again. As well as set the destination to self position so it stops dead.
This method would also allow collisions to work, as you can add a rule so that when the actor collides the interpolate is stopped.
Whether this approach is any better I'm not so sure, but interesting to know that it can be done all the same.
Carrying on @StormyStudio's side note, I did a small test a while back to show a way to stop an interpolated movement as well... found it in my pile somehow, hope it comes in useful for you (or anyone else... :-) )
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Cheers, I got testing and I sort of got it to work so it could be interfered. After looking at the demo I made adjustments and sort of combined it with some knowledge @Rthurman shared. Great stuff thanks
Still trying to do some work on how to interpolate something, but if it goes past a certain speed, then the amount if time it takes increases so that it just doesn't become a blur moving so fast. But that's another story.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS