Replies: 1 comment
-
@AThousandShips I got a very good result by using https://github.com/hydroper/carknockonline/blob/master/src/util/constant_physics_rotation_tween.gd I updated the demo so you can see it working: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm trying to achieve this movement mechanism (similiar to SharkBite Bay Adventure):
This demo works, except there is no scrolling (
Camera2D
).The issue of adding a
Camera2D
to that car is that I'm assigningrotation_degrees
manually and a bug happens such that I'm unable to move the car. While this seems like a bug, since the game basically works as you see above, maybe it'd make sense to add a new property that is more useful thanlock_rotation
.Considerations:
CharacterBody2D
: I've usedCharacterBody2D
instead ofRigidBody2D
. I've got 3 problems with it:apply_torque
: I don't want a torque; the game's movement system is similiar to SharkBite Bay, not like other common 2D top-down car games. For example:state.angular_velocity
in_integrate_forces
: it looks like changing the car's rotation in_integrate_forces
withstate.angular_velocity
instead of settingrotation_degrees
manually doesn't break the game, but then it's not possible to tween properly, because:Also, unrelated to the problem, but I had to implement my own tweener (which is simple) because Godot's built-in
Tween
:I think there should be a built-in way to constantly tween the rotation in physics without having to tweak the
angular_velocity
. Any idea?Here's the source:
Beta Was this translation helpful? Give feedback.
All reactions