Skip to main content
This does not appear to be related to the design of your game.
Link
Philipp
  • 121.5k
  • 28
  • 261
  • 342
added 24 characters in body; edited tags
Source Link

The issue i am having is that i can't seem to figure out how to apply force from a rocket to a bodies center of mass.

*Edit This is in 2D

e.g. Let's call the body 'ship'

the 'ship' is 1000 (relative unit) and the center of mass is normalized at [0,0] (origin)

the 'ship' has two rockets (lets say for thrust vectoring), one at [-2,-4] (left) and one at [2,-4] (right) relative to the center of mass, and that both had nozzles pointed down (90 degree angle counterclockwise from x)

if the left rocket were to fire at say 500 (relative unit), what formula could i use to find the resulting force and angular force on the center of mass?

if it helps, the language is a superset of javascript (custom preparser similar to typescript), and i'm using a custom physics engine that only accepts force on center of mass as an array e.g. [force x, force y, force angular]. I tried to recycle my collision detection algorithm but it was like jamming a square into a circle shaped hole.

I've searched since last night and can't seem to find a formula to do this (atleast not one I can understand, I can't understand complex math notations).

Any and all help is greatly appreciated.

TL;DR
I need a formula that gives the resulting force and angular force from a offset rocket on center of mass where the result looks like:

[force x , force y , force angular]

the center of mass is normalized to origin,

and takes the variables:
rocket offset ([x,y]),
rocket angle (in degrees to center of mass),
force of rocket (in relative units)

The issue i am having is that i can't seem to figure out how to apply force from a rocket to a bodies center of mass.

e.g. Let's call the body 'ship'

the 'ship' is 1000 (relative unit) and the center of mass is normalized at [0,0] (origin)

the 'ship' has two rockets (lets say for thrust vectoring), one at [-2,-4] (left) and one at [2,-4] (right) relative to the center of mass, and that both had nozzles pointed down (90 degree angle counterclockwise from x)

if the left rocket were to fire at say 500 (relative unit), what formula could i use to find the resulting force and angular force on the center of mass?

if it helps, the language is a superset of javascript (custom preparser similar to typescript), and i'm using a custom physics engine that only accepts force on center of mass as an array e.g. [force x, force y, force angular]. I tried to recycle my collision detection algorithm but it was like jamming a square into a circle shaped hole.

I've searched since last night and can't seem to find a formula to do this (atleast not one I can understand, I can't understand complex math notations).

Any and all help is greatly appreciated.

TL;DR
I need a formula that gives the resulting force and angular force from a offset rocket on center of mass where the result looks like:

[force x , force y , force angular]

the center of mass is normalized to origin,

and takes the variables:
rocket offset ([x,y]),
rocket angle (in degrees to center of mass),
force of rocket (in relative units)

The issue i am having is that i can't seem to figure out how to apply force from a rocket to a bodies center of mass.

*Edit This is in 2D

e.g. Let's call the body 'ship'

the 'ship' is 1000 (relative unit) and the center of mass is normalized at [0,0] (origin)

the 'ship' has two rockets (lets say for thrust vectoring), one at [-2,-4] (left) and one at [2,-4] (right) relative to the center of mass, and that both had nozzles pointed down (90 degree angle counterclockwise from x)

if the left rocket were to fire at say 500 (relative unit), what formula could i use to find the resulting force and angular force on the center of mass?

if it helps, the language is a superset of javascript (custom preparser similar to typescript), and i'm using a custom physics engine that only accepts force on center of mass as an array e.g. [force x, force y, force angular]. I tried to recycle my collision detection algorithm but it was like jamming a square into a circle shaped hole.

I've searched since last night and can't seem to find a formula to do this (atleast not one I can understand, I can't understand complex math notations).

Any and all help is greatly appreciated.

TL;DR
I need a formula that gives the resulting force and angular force from a offset rocket on center of mass where the result looks like:

[force x , force y , force angular]

the center of mass is normalized to origin,

and takes the variables:
rocket offset ([x,y]),
rocket angle (in degrees to center of mass),
force of rocket (in relative units)

Source Link

how to calculate resulting velocity and angular velocity rocket has on center of mass

The issue i am having is that i can't seem to figure out how to apply force from a rocket to a bodies center of mass.

e.g. Let's call the body 'ship'

the 'ship' is 1000 (relative unit) and the center of mass is normalized at [0,0] (origin)

the 'ship' has two rockets (lets say for thrust vectoring), one at [-2,-4] (left) and one at [2,-4] (right) relative to the center of mass, and that both had nozzles pointed down (90 degree angle counterclockwise from x)

if the left rocket were to fire at say 500 (relative unit), what formula could i use to find the resulting force and angular force on the center of mass?

if it helps, the language is a superset of javascript (custom preparser similar to typescript), and i'm using a custom physics engine that only accepts force on center of mass as an array e.g. [force x, force y, force angular]. I tried to recycle my collision detection algorithm but it was like jamming a square into a circle shaped hole.

I've searched since last night and can't seem to find a formula to do this (atleast not one I can understand, I can't understand complex math notations).

Any and all help is greatly appreciated.

TL;DR
I need a formula that gives the resulting force and angular force from a offset rocket on center of mass where the result looks like:

[force x , force y , force angular]

the center of mass is normalized to origin,

and takes the variables:
rocket offset ([x,y]),
rocket angle (in degrees to center of mass),
force of rocket (in relative units)