x


Stucked at enemy movement

Hi ppl, I am making a TD game in unity, Initially I made all of my enemy movements frame rate dependent say:

I had a grid point1 at -22.65 and other at -21.1, diagrammatically:

(-22.65) ___________________(-21.1)_________________(-21.1+1.55) ......

so the distance on x axis between two points is 1.55, divided it by 25 jumps with each enemy jump of 0.062 of each frame. On reaching on next point of grid the enemy find again its path. All went fine until I have requirement of FastForward and Pause feature. I used timeScale property but it wont work as they are frame dependent. I also tried double speed of enemy on clicking fast forward button at any time has some issues that enemy jumps are now less and it fails to reach on next grid point.

Could someone suggest me solution to my problem. Do I need to change the enemy movement code to make it frame independent ?? I need the enemy to reach on the grid specific point I also need later to slow down any one enemy's speed when tower fires on it. Thnx

more ▼

asked Jan 31 '12 at 03:06 PM

haroonalam gravatar image

haroonalam
65 25 35 36

(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x4167
x134
x5

asked: Jan 31 '12 at 03:06 PM

Seen: 551 times

Last Updated: Jan 31 '12 at 03:06 PM