Jump to content

Find perpendicular location

- - - - -

  • Please log in to reply
No replies to this topic

#1
RileyVanZeeland

RileyVanZeeland

    Newbie

  • Members
  • Pip
  • 1 posts
Hi, I am doing an assignment for uni and can't figure out a way to find the perpendicular location to where I am facing.
I am programming using a weird language called 'Steve' similar to python I think. This is essenstially what I need solved:

enemyLoc = (enemy get-location).

			myLoc = (self get-location).

			if count > 0: {

				# goal is to move perpendicular

				#posX = 

				#posY = 

				dest = enemyLoc + (posX, posY).		

				self move-me to dest.

			}

enemyLoc is a co-ordinate (x, y) and so is myLoc. Just an algorithm would be great and I can convert it from there.

Any help would be much appreciated as I have been trying different ways for hours. :/




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users