Page 1 of 1

getting length in pixel when moving?

PostPosted: Sat Jan 01, 2011 8:44 am
by poopbrigade
Hello everyone , :D can someone help me with this little problem.

is there a way to know how much pixel is used when a actor moves.

like 6 directional_velocity, does it move 6 pixels per second or is it just 1-2 pixel/s in a different speed of a timer depending on velocity?

and what about different angles?


thanx in advance XD....

the reason why I wanna know how,because I want to stop my actor before he collides, given that its speed will make the actor go through an object.

like when your actor is near another actor and its directional_velocity is 1000 and its distance between the collided actor is 1 pixel also the other actors height and width is about 1 pixel same with the colliding actor.

XD its bound to pass through...

again thanx in advace. ;D

Re: getting length in pixel when moving?

PostPosted: Sat Jan 01, 2011 8:59 am
by skydereign
The velocity variables hold a value, equal to the number of pixels the actor moves per frame. By default there are 30 frames per second. So if you want to know how many pixels the actor is moving, then simply use xvelocity and yvelocity. If you are using directional_velocity, and angle, then the xvelocity and yvelocity variables can still be used.

Re: getting length in pixel when moving?

PostPosted: Sat Jan 01, 2011 11:46 am
by poopbrigade
:?: Hmmm XD... thanX