# Enemies moving in curves at a constant speed

Page 1 of 1

## 1 Replies - 360 Views - Last Post: 30 December 2012 - 12:37 PMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=305218&amp;s=4c9e34bb6fb2e25a30052cbbd491976b&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 slehmann101

Reputation: 21
• Posts: 146
• Joined: 30-November 11

# Enemies moving in curves at a constant speed

Posted 30 December 2012 - 11:40 AM

Currently I am using the Pythagorean theorem to determine how much the X/Y values should be increasing for when I am tracking the Player.

However the problem is that the enemy slows it's speed as it approaches it's goal. Should I be using the values as a ratio instead of the increase in X/Y?

This post has been edited by slehmann101: 30 December 2012 - 11:41 AM

Is This A Good Question/Topic? 0

## Replies To: Enemies moving in curves at a constant speed

### #2 anonymous26

• D.I.C Lover

Reputation: 1
• Posts: 3,638
• Joined: 26-November 10

## Re: Enemies moving in curves at a constant speed

Posted 30 December 2012 - 12:37 PM

There is no specification nor code to review to see what the problem is. As it stands your guess is as good as mine.

Page 1 of 1

 .related ul{list-style-type:circle;font-size:12px;font-weight:bold;}.related li{margin-bottom:5px;background-position:left 7px!important;margin-left:-35px;}.related h2{font-size:18px;font-weight:bold;}.related a{color:blue;}