Why does angle affect physics?

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • I made an 8-directional physics movement player and I want to get it to behave like a twin-stick shooter. To get any sort of decent movement I had to set the acceleration to 100 and deceleration to 2000. The problem is that when I set the player's angle between the player and Xmouse, Ymouse the angle seems to apply force to the movement, which is undesirable. There are already physics controls for this, all I want is to set the angle of the sprite and not have any effect on physics.

    Please login to see this link. | Please login to see this link. | Please login to see this link. | Please login to see this link.

  • As far as I know you should not mix two different types of control for any physics objects. Unless the physics object is defined as Kinematic it will use any change of its transformation for physic simulation. For example you should never set position to X,Y as that would mess up the simulation. That's just how it works.
    You could however use torque to rotate the body, or you can disable rotation of the body and just rotate the actual sprite or you can try setting angular velocity to 0. I don't know how box2d work in F2.5, but I hope some of those options would be available there.

  • Another thing you could do is make an invisible object that handles the movement, and then have the object you want to rotate always look towards the mouse. Or you could make a turret object that always faces towards the mouse if the vehicle that the player is using has a turret.

    My Please login to see this link. (which I actually use), my Please login to see this link. (which I mostly don't use), and my Please login to see this link. (which I don't use anymore pretty much at all really). If there are awards for "'highest number of long forum posts", then I'd have probably won at least 1 by now. XD

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!