Feature Request Checklist
Overview
Right now, physics.gravity is a number:
gravity (_0.35`_): How much to increase y-velocity downward each tick.
That allows users to specify different vertical amounts. That includes negative gravities such as in the Inverse Gravity demo.
But, what if users want to rotate gravity at an arbitrary angle? Say, make it horizontal (90 degrees) or directly diagonal (45 degrees)? There's no clean way to do that right now.
Proposal: how about allowing gravity to alternately be an object containing:
acceleration: what the number currently represents, with the same 0.35 default
angle: a number in [0, 360), currently defaulting to 180 (down)
Additional Info
This would not be a breaking change as proposed. The default should still be number with the current angle.
🎆
Feature Request Checklist
mainbranch of the repository.Overview
Right now,
physics.gravityis anumber:That allows users to specify different vertical amounts. That includes negative gravities such as in the Inverse Gravity demo.
But, what if users want to rotate gravity at an arbitrary angle? Say, make it horizontal (90 degrees) or directly diagonal (45 degrees)? There's no clean way to do that right now.
Proposal: how about allowing
gravityto alternately be an object containing:acceleration: what the number currently represents, with the same0.35defaultangle: a number in[0, 360), currently defaulting to180(down)Additional Info
This would not be a breaking change as proposed. The default should still be
numberwith the current angle.🎆