Timeline for Adding spread to velocity Vector3D
Current License: CC BY-SA 4.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 8, 2019 at 4:11 | history | edited | Pikalek | CC BY-SA 4.0 |
added 2 characters in body
|
Jul 6, 2019 at 12:28 | comment | added | DMGregory♦ | Euler angles will not give you the results you want here. As illustrated here, stacking ranges of Euler angles tends to make odd shapes that are not what you intended or predicted from looking at your math. I'd strongly recommend throwing away Euler angles and trying a fresh approach for bullet spread. | |
Jul 6, 2019 at 7:24 | comment | added | codecustard |
I am trying to work with Euler angles. I grab two angles from the direction XZ plane and YZ plane and then add a random spread. Then I convert them back into two vectors. Then I combine the two vectors to get the new direction with the added spread. If I also add a random spread in the XY plane by first grabbing the angle, add a spread, convert to vector: float angle3 = atan(dir.y, dir.x) + spread; vec3 xy_dir vec3(cos(angle1_rad), sin(angle1_rad), 0.0); How would I add this xy vector to the other two vectors?
|
|
Jul 6, 2019 at 1:31 | comment | added | Vaillancourt♦ | Can this question provide the solution to your issue? | |
Jul 6, 2019 at 0:55 | review | First posts | |||
Jul 8, 2019 at 4:13 | |||||
Jul 6, 2019 at 0:52 | history | asked | codecustard | CC BY-SA 4.0 |