actor movement

Shishkov

  • Posts: 169
Hello everybody.

I have 2 types of the control movement: keyboard, keyboard+mouse. My actor faces toward the mouse cursor(aim) and he can also move across the whole scene, but when actor approaches to the border of the scene, it starts to move along the elipse or the circle rather than continue to move with the cursor(aim) and appear in the opposite side of the scene. I want to have the same control maovement as counter-strike game, in other words, when I press D button, I move to the left with the cursor(aim).

How can it be solved?

Thanks in advance.

Shishkov

  • Posts: 169
In general, problem is that when I press the LEFT button, an actor moves to the left like in COUNTER-STRIKE game, but when my actor approaches the border of the scene, it moves along an elipse or a circle relatively a mouse cursor rather than moves with cursor. The mouse cursor as an aim for the actor.



For instance, if my mouse cursor in the centre of the screen, actor orbits it along an elipse or a circle because it faces the mouse cursor and fires toward the mouse cursor.





dtrungle

  • Posts: 1938
I still have no idea what the problem is. Some pictures would be nice. All I can say right now is that you should look at your movement code.

Shishkov

  • Posts: 169
here is an archive with 6 pictures of the sequent movement.

dtrungle

  • Posts: 1938
So the problem is that you don't want the ship to face the cursor? Look at your code and change it.

Shishkov

  • Posts: 169
I want that my ship faces the cursor, but I do not want to move around this cursor when ship approaches to the border of the scene.
I want to have a movement like in counter-strike, half-life, etc. I don't know how it is called in English, so that is why it is very difficult for me to put into words. Maybe straff.

And if only I knew how it is in Russian

« Last Edit: April 03, 2013, 12:26:26 pm by Shishkov »

dtrungle

  • Posts: 1938
Have a look at your cursor movement code. That's assuming that your cursor is a lightweight actor set to the mouse x/y.

Shishkov

  • Posts: 169
here is the picture of what I have inside this scene behaviour

dtrungle

  • Posts: 1938
At this point I have no idea. Maybe the drawn image position is being changed slightly. Try to use a regular arrow pointer, does the pointer move around?

Shishkov

  • Posts: 169
What do you mean in the arrow pointer?

Here is the code of what I have inside the movement


dtrungle

  • Posts: 1938
I mean the original mouse pointer. The arrow/hand, the default mouse cursor.

Shishkov

  • Posts: 169
I will check it tomorrow at your pacific time because now it is the morning in Russia

« Last Edit: April 03, 2013, 09:32:17 pm by Shishkov »

Shishkov

  • Posts: 169
I remember that the picture of the aim is placed in the center(default). So I don't think that the picture is shifted, but I will check to be completely sure.

Any other ideas?