godotengine / godotengine/godot-docs

RigidBody2D incorrectly states impulse rotation is in global space.

Open
#4,825 1 comment 0 reactions 0 assignees View on GitHub
area:class reference bug topic:physics
Dominant language
reStructuredText
Stars
5.7k
Forks
3.8k
Avg merge
1d 20h
Merged PRs (30d)
25

Description

**Your Godot version:**
3.2.3

**Issue description:**
> The position uses the rotation of the global coordinate system, but is centered at the object's origin.

First of all this is super weirdly worded and needs to be improved.

But even then, given a RigidBody2D rotated 90° with this code:

```py
func _physics_process(delta):
apply_impulse(Vector2.RIGHT * 100.0, Vector2.DOWN)
```

![image](https://user-images.githubusercontent.com/14253836/114153034-8b2ed600-98e4-11eb-87b9-ec39fcaf953a.png)

A torque is applied:

![image](https://user-images.githubusercontent.com/14253836/114153156-a7327780-98e4-11eb-9f73-c6a832ba9833.png)

**URL to the documentation page:**
https://docs.godotengine.org/en/stable/classes/class_rigidbody2d.html#class-rigidbody2d-method-apply-impulse

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.