#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

# Touch steering stutters

Posts: 8Member, PRO

Hi guys.
In my game I have a problem with the steering of my actor (rocket).
I used the following commands to steer the rocket:

The problem is: Once the rocket reached the touch location you cant move your finger to a new position on the cscreen and the rocket follows...
You always have to lift the finger and touch again on an other point of the screen. Then it works.
Since I wanna creat a game for kids, thats a problem, because it makes the steering harder and not so smoothly.
Does anyone have an idea how to work around this?
Keep on gaming!

• London, UK.Posts: 12,821Member
edited March 2017

You don't need the three conditions that say:

When Touch is Outside + When Touch is Inside + When Touch is Pressed

That's the same as saying 'When Mouse Button is Down'.

. . . . . . . . . .

For the movement issue, trying replacing your rules with the following:

When Mouse Button is Down
--Constrain Linear velocity X to 5`*`(Mouse.X -self.X)
--Constrain Linear velocity Y to 5`*`((Mouse.Y +76)-self.Y)
Otherwise
--Change Linear velocity X to 0
--Change Linear velocity Y to 0

. . . . . . .

And here's the same thing if you want to include Rotation:

When Mouse Button is Down
--Constrain Linear velocity X to 5`*`(Mouse.X -self.X)
--Constrain Linear velocity Y to 5`*`((Mouse.Y +76)-self.Y)
--Constrain Rotation to vectorToAngle(Linear velocity.X,Linear Velocity.Y )
Otherwise
--Change Linear velocity X to 0
--Change Linear velocity Y to 0

• London, UK.Posts: 12,821Member

Example Project Attached:

• Posts: 8Member, PRO

Thanks a lot!
You really helped me out!
The steering is much better now.

• London, UK.Posts: 12,821Member

@eberlepeter said:
Thanks a lot!
You really helped me out!
The steering is much better now.

Play around with the '5' value to tighten or loosen the feel of the tracking.

• Posts: 8Member, PRO

Yeah thats what i did and I found a sweet spot.
Thanks. It made my App much better.