The Daily Click ::. Forums ::. Klik Coding Help ::. Move Object to Where You Clicked?
 

Post Reply  Post Oekaki 
 

Posted By Message

Scott Handelman



Registered
  19/05/2004
Points
  117
19th May, 2004 at 03:02:29 -

Hey all, I'm very new at this. Here's my question:

I have an object, a man, and what I want to do is, in-game, click somewhere on the screen and have that man move to where I clicked. I can figure out how to move an object instantly to where I've clicked as if by teleportation, but I can't figure out how to move the object on a direct path with animation.

Am I making myself clear? Any thoughts?

 
n/a

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
19th May, 2004 at 12:00:19 -

A better movement would be to make a simple custom movement, when the player clicks store the x and y positions in variables, and if the player's x and y positions are different, made them move across until the coordinates are the same

 
n/a

Arf :: FPP Games



Registered
  15/05/2002
Points
  1364
19th May, 2004 at 13:56:56 -

That won't move directly towards the point though, unless its at an angle of exactly 45 or 90 degrees. To get it to move exactly in the direction of the target point you'd need a 360 degree movement system with decimal accuracy. Although if you're "very new at this" then that may be a bit too complicated.
So, yeah, what Phizzy said...

 
n/a
   

Post Reply



 



Advertisement

Worth A Click