Isometric movement?

unatron

  • Posts: 9
I'm trying to get my player to move isometrically. I've got the right/left movement working, but up/down doesn't seem to want to go any more oblique than 45º. I need it to be at 26.5º. Is this a bug in Stencyl or am I doing something wrong?

Thanks!!!

Hectate

  • *
  • Posts: 4643
Have you tried using the motion blocks that use degrees instead?
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.

Alexin

  • *
  • Posts: 3127
You are pushing the actor in different directions and these actions add up to the velocity making less predictable. You should set the velocity directly instead, or at least reset the velocity to zero before applying a new force.

By the way, if you want to push an object to the right then xDir should be 1.0 and yDir should be 0.0.

Right: xDir = 1.0  yDir = 0.0
Left: xDir = -1.0  yDir = 0.0
Up: xDir = 0.0  yDir = -1.0
Down: xDir = 0.0  yDir = 1.0

Up-Right: xDir = 1.0  yDir = -1.0
"Find the fun"
alexin@stencyl.com

Hectate

  • *
  • Posts: 4643
You are pushing the actor in different directions and these actions add up to the velocity making less predictable. You should set the velocity directly instead, or at least reset the velocity to zero before applying a new force.

By the way, if you want to push an object to the right then xDir should be 1.0 and yDir should be 0.0.

Right: xDir = 1.0  yDir = 0.0
Left: xDir = -1.0  yDir = 0.0
Up: xDir = 0.0  yDir = -1.0
Down: xDir = 0.0  yDir = 1.0

Up-Right: xDir = 1.0  yDir = -1.0
Good point about the velocity, I hadn't thought of that happening but momentum would definitely throw off the apparent results.

But as far as directions go, he's doing Isometric view so moving "right" in the world is more like "right and down" in the view.
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.

unatron

  • Posts: 9
I just saw these replies. Thanks so much!

I decided to rotate the game board 45º instead of making it isometric, just to simplify my life. The directional numbers helped though, and now I know what to do when I'm ready to try an isometric game.

I've posted it as a work in progress here: http://www.stencyl.com/game/play/7987

There's still quite a lot to fix!