Game Bug Query - MoveTo Velocity of 0 does not stop movement

Questions, comments and discussion about the Game Editor development.

Game Bug Query - MoveTo Velocity of 0 does not stop movement

Postby bamby1983 » Sun Jan 20, 2013 9:17 pm

I came across a bug regarding the MoveTo function and wanted to check whether anyone else has faced it so far. Setting the MoveTo velocity of an actor to zero doesn't stop movement. The velocity decreased all the way until 0.1 when I was checking for lower speeds, but when I set the value to 0, the actor moved at what seems to resemble a velocity of 1.

Has anyone else encountered this sort of an issue?
bamby1983
 
Posts: 112
Joined: Tue Jul 31, 2012 11:36 pm
Score: 8 Give a positive score

Re: Game Bug Query - MoveTo Velocity of 0 does not stop move

Postby skydereign » Sun Jan 20, 2013 9:21 pm

That's a problem with gE, I presume it is there, so it doesn't have to keep calculating the proper path, and if you have the actor avoid, compute shortest path. You are supposed to stop an actor using MoveTo to move them to their position. I'll see if I can improve that for the next version of gE.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Game Bug Query - MoveTo Velocity of 0 does not stop move

Postby bamby1983 » Mon Jan 21, 2013 4:52 am

Thanks for the information.

Probably all that would be needed was to use an if-condition within the existing MoveTo code so that it did something on the following lines:

Code: Select all
if (velocity!=0) {
    // MoveTo function code
                      }


That way, if the velocity equals 0, it's as if the function did not execute as nothing happens. I manually coded this bit into my code and it works fine.
bamby1983
 
Posts: 112
Joined: Tue Jul 31, 2012 11:36 pm
Score: 8 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron