Improving the feature of track rotation
4 posts • Page 1 of 1
Improving the feature of track rotation
"Track rotation" is nice feature. However, there are some weaknesses in this feature.
Download the scene below and see the weaknesses:
About Scene.Camera.pan:
(1) Scene.Camera.pan is unnatural.
I want object to be sticked to the window. However object moves around the window.
(2) Paning is unnatural.
This weakness might be the same as (1).
About Scene.Camera.rotation:
(3) Scene.Camera.rotation will take zero by pressing "show group" button.
So, object rotates by this button.
(4) Cutting the tracked rotation object/objects changes Scene.Camera.rotation.
This is because cutting geometries changes angle into 0.
(5) Brush-tool or CSG will also changes Scene.Camera.rotation.
Same as (4).
About visualizations:
(6) The visualizations are also rotating.
Edit: (6) has been fixed at v1.7.2! Thanks
About (1):
I've considered this issue.
In addition, I made a system to change Camera.pos correctly by using Thyme. Copy and paste this code to try.
(This script uses laser, so that this requires Algodoo.)
Download the scene below and see the weaknesses:
About Scene.Camera.pan:
(1) Scene.Camera.pan is unnatural.
I want object to be sticked to the window. However object moves around the window.
(2) Paning is unnatural.
This weakness might be the same as (1).
About Scene.Camera.rotation:
(3) Scene.Camera.rotation will take zero by pressing "show group" button.
So, object rotates by this button.
(4) Cutting the tracked rotation object/objects changes Scene.Camera.rotation.
This is because cutting geometries changes angle into 0.
(5) Brush-tool or CSG will also changes Scene.Camera.rotation.
Same as (4).
About visualizations:
(6) The visualizations are also rotating.
Edit: (6) has been fixed at v1.7.2! Thanks
About (1):
I've considered this issue.
In addition, I made a system to change Camera.pos correctly by using Thyme. Copy and paste this code to try.
(This script uses laser, so that this requires Algodoo.)
- Code: Select all
Scene.my.pos_old = App.mousePos;
Scene.my.pos_current = App.mousePos;
Scene.my.angle = 0.0;
Scene.my.temp = [0, 0] - App.mousePos;
Scene.addBox {
entityID = 1;
geomID = 1;
body = 1;
size = [1.0, 1.0];
color = [0.5, 0.5, 0.5, 1.0];
pos = [0.0, 0.0];
glued = true;
};
Scene.addBox {
entityID = 2;
geomID = 2;
body = 1;
size = [0.125, 0.125];
color = [0.0, 0.0, 0.0, 1.0];
pos = [-0.0625, 0.0];
glued = true;
collideSet = 2;
refractiveIndex = 1.0;
};
Scene.addHinge {
geom0 = 1;
geom0pos = [0.3, 0.3];
geom1 = 0;
world1pos = [0.3, 0.3];
motor = true;
color = [1.0, 1.0, 1.0, 1.0];
entityID = 74;
size = 0.2
};
Scene.addLaserPen { //use Laser for get pos and angle of the object.
entityID = 3;
geom = 1;
size = 0.2;
color = [1.0, 0.0, 0.0, 1.0];
relPoint = [0.125, 0.0];
rotation = 3.1415925;
collideSet = 2;
onLaserHit = (e)=>{
Scene.my.pos_old = Scene.my.pos_current; // P
Scene.my.pos_current = e.pos; // P'
Scene.Camera.pan = Scene.Camera.pan + Scene.my.pos_current - Scene.my.pos_old; // O' = O + P' - P
Scene.my.angle = { // angle of the geometry.
e.normal(0) == 0 ? {e.normal(1) > 0 ? {math.pi / 2} : {-math.pi / 2}}
: {e.normal (0) > 0 ? {math.atan(e.normal(1)/e.normal(0))}
: {math.atan(e.normal(1)/e.normal(0)) + math.pi}
}
};
Scene.Camera.rotation = -Scene.my.angle; //theta
Scene.my.temp = Scene.Camera.pan - Scene.Camera.pos_current; //P'O'
Scene.Camera.pan = //O''
[Scene.my.pos_current(0) + (cos(Scene.Camera.rotation)*Scene.my.temp(0) + sin(Scene.Camera.rotation)*Scene.my.temp(1)),
Scene.my.pos_current(1) + (-sin(Scene.Camera.rotation)*Scene.my.temp(0) + cos(Scene.Camera.rotation)*Scene.my.temp(1))];
}
}
NOTE: I'm not an Algoryx member.
Hi, Algodoo lovers. Have you read next topic? Featured scenes suggestions
To translators: English.cfg changelog will be useful (even for me).
Hi, Algodoo lovers. Have you read next topic? Featured scenes suggestions
To translators: English.cfg changelog will be useful (even for me).
-
tatt61880 - [Most Helpful Person 2010]
- Posts: 1150
- Joined: Mon Aug 31, 2009 5:45 pm
- Location: Tokyo, Japan
Re: Improving the feature of track rotation
I've uploaded video which shows these issues.
NOTE: I'm not an Algoryx member.
Hi, Algodoo lovers. Have you read next topic? Featured scenes suggestions
To translators: English.cfg changelog will be useful (even for me).
Hi, Algodoo lovers. Have you read next topic? Featured scenes suggestions
To translators: English.cfg changelog will be useful (even for me).
-
tatt61880 - [Most Helpful Person 2010]
- Posts: 1150
- Joined: Mon Aug 31, 2009 5:45 pm
- Location: Tokyo, Japan
Re: Improving the feature of track rotation
Hi.
No feedback from developers?
Is it difficult to implement?
No feedback from developers?
Is it difficult to implement?
NOTE: I'm not an Algoryx member.
Hi, Algodoo lovers. Have you read next topic? Featured scenes suggestions
To translators: English.cfg changelog will be useful (even for me).
Hi, Algodoo lovers. Have you read next topic? Featured scenes suggestions
To translators: English.cfg changelog will be useful (even for me).
-
tatt61880 - [Most Helpful Person 2010]
- Posts: 1150
- Joined: Mon Aug 31, 2009 5:45 pm
- Location: Tokyo, Japan
Re: Improving the feature of track rotation
Hi, I've created an image to show how to improve "Track rotation".
Please tell me when my explanation is not good to understand.
Please tell me when my explanation is not good to understand.
NOTE: I'm not an Algoryx member.
Hi, Algodoo lovers. Have you read next topic? Featured scenes suggestions
To translators: English.cfg changelog will be useful (even for me).
Hi, Algodoo lovers. Have you read next topic? Featured scenes suggestions
To translators: English.cfg changelog will be useful (even for me).
-
tatt61880 - [Most Helpful Person 2010]
- Posts: 1150
- Joined: Mon Aug 31, 2009 5:45 pm
- Location: Tokyo, Japan
4 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 3 guests