gama.old
gama.old copied to clipboard
Combination of rotate: and size: in 'draw' produce wrong rotations for spheres and cylinders
Describe the bug When using rotate with any value (an angle or an angle + the axis), spheres and cylinders rotate around some axis, but not their own center.
To Reproduce Steps to reproduce the behavior:
- Build a simple model with a draw statement like this one:
draw sphere(10) rotate: 15;
- Run it.
- The sphere rotates about an axis which is difficult to determine, but which is not its center
Expected behavior Spheres and cylinders should rotate like cubes or pyramid, around their own center of gravity
Desktop (please complete the following information):
- OS: macOS High Sierra
- GAMA version: git
- Java version 1.8
Difficult to understand exactly what happens. Even with a fixed position it shows up...
Well, actually my example is misleading. The combination that produces this error is
draw sphere(10) size: 10 rotate: 15;
It is the combination of the rotation and the scaling (via size:) that produces this effect. As if one of the translations to make (back and forth) during scaling was not done. Without size: everything is normal.
Closing and moving this thread to #2209, in the long list of OpenGL rendering issues to fix...
I also notify a "weird" behavior using rotate and size at the same time with some specific angle (hard to knwo exactly which one) the size of the obj_file is smaller
Can be tested in Moving 3D Object.gaml
Reopening this issue for the next round of development on GAMA 2.0