Replies: 1 comment 1 reply
-
Related: |
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
Hello.
I am working on a game like everyone else, and at multiple points in time I have to use custom gravity.
While it works from code, I see some issues when lots of rigidbodies have a script with the only purpose of changing the way gravity works.
More precisely, what am I talking about.
Gravity in areas now works in 2 distinct ways:
My suggestion would be for the gravity when it is point, to have selectable individual axis, using a normalized vector3 for defining the axis of the gravity being applied.
This would also allow changing of it using a simple normalized direction_to vector, for when the area3d containing the gravity also changes, since as you know, the gravity vector does not rotate with the area.
In my game, I needed multiple times to use gravity in a cylindrical shape, so only on 2 axis, that being the x and z axis.
Note that changing the direction of the area gravity the way it is currently implemented does not work, as that is simply a compound vector of the gravity that does not take into account the player's position, in the way that point gravity does.
This would allow for setting something like gravity_axis:Vector3(1,0,1).normalized() to have the 2 axis being affected by that % amount
Beta Was this translation helpful? Give feedback.
All reactions