0

I have implemented moving my character using Contact.TangentSpeed (something similar to this: http://www.iforce2d.net/b2dtut/conveyor-belts):

foreach (var contact in GroundContacts)
{
    contact.Contact.TangentSpeed = -MaximumVelocity;
}

Unfortunately, when I move my character to a place like this: enter image description here

It moves into the walls instead of stopping. If I press character with ApplyForce, everything is ok though.

How to make it stop instead of moving into the wall, without explicitly checking for previously described situation?

I think it might be important to note, that the black bodies are static.

Michał
  • 2,202
  • 2
  • 17
  • 33
  • 1
    Hmm... this method was always kind of a hack. Is that dynamic body a fixed rotation body? I wonder if that has something to do with it. – iforce2d Aug 10 '14 at 20:23
  • @iforce2d It is a fixed rotation body. And as far as I know, the initial value of TangentSpeed is always 0, and is meant to be used explicitly for conveyor belts (Farseer's source comments `TangentSpeed` with `Get or set the desired tangent speed for a conveyor belt behavior. In meters per second.` - so it does not seem to be a hack no more :). I fixed the problem with explicit checking though :) – Michał Aug 11 '14 at 13:42

0 Answers0