Skip to content

Commit

Permalink
fix set_velocity for object (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
QuanyiLi committed Sep 6, 2021
1 parent 8613cb9 commit 331f7e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metadrive/base_class/base_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def set_velocity(self, direction: list, value: float):
"""
norm_ratio = value / norm(direction[0], direction[1])
self._body.setLinearVelocity(
LVector3(direction[0] * norm_ratio, direction[1] * norm_ratio,
LVector3(direction[0] * norm_ratio, -direction[1] * norm_ratio,
self.origin.getPos()[-1])
)

Expand Down

0 comments on commit 331f7e7

Please sign in to comment.