Jump to content

speed


wildcherrii
 Share

Recommended Posts

I would like to know why this happens to me for no reason at all.

In the Start() script for my monster I give him a point to travel to with the default speed.

    self.ai.piv:GoToPoint(pos.x, pos.y, pos.z,  1.4, 1.0)

later on in side the Updatephysics() loop I have need to change the monster speed. So i issue a new :

    self.ai.piv:GoToPoint(pos.x, pos.y, pos.z,  2.8, 2.0)

But oh NO!!!!   nothing happens, he traverses at the same speed. How stupid.

Is this the normal way to increase and or decreases moving speed when using a gotopoint() command.

If so why does it not work for me, theres nothing special going on in the code.

 

 

 

 

Link to comment
Share on other sites

I looked at the source code, and inside that command there is a check to skip the command if the destination is close to what was previously set. So your command is being ignored. You can prevent this by calling Entity::Stop() before setting the entity destination with the new speed.

  • Like 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...