How to make the node translation?
up vote
0
down vote
favorite
The solarsystem case can make node rotate and I want to know how to animate an Object up and down?
This is the solarsystem case code:
Quaternion orientation1 = Quaternion.axisAngle(new Vector3(0.0f, 1.0f, 0.0f), 0);
Quaternion orientation2 = Quaternion.axisAngle(new Vector3(0.0f, 1.0f, 0.0f), 120);
Quaternion orientation3 = Quaternion.axisAngle(new Vector3(0.0f, 1.0f, 0.0f), 240);
Quaternion orientation4 = Quaternion.axisAngle(new Vector3(0.0f, 1.0f, 0.0f), 360);
ObjectAnimator orbitAnimation = new ObjectAnimator();
orbitAnimation.setObjectValues(orientation1, orientation2, orientation3, orientation4);
orbitAnimation.setPropertyName("localRotation");
orbitAnimation.setEvaluator(new QuaternionEvaluator());
orbitAnimation.setRepeatCount(ObjectAnimator.INFINITE);
orbitAnimation.setRepeatMode(ObjectAnimator.RESTART);
orbitAnimation.setInterpolator(new LinearInterpolator());
orbitAnimation.setAutoCancel(true);
android arcore sceneform
add a comment |
up vote
0
down vote
favorite
The solarsystem case can make node rotate and I want to know how to animate an Object up and down?
This is the solarsystem case code:
Quaternion orientation1 = Quaternion.axisAngle(new Vector3(0.0f, 1.0f, 0.0f), 0);
Quaternion orientation2 = Quaternion.axisAngle(new Vector3(0.0f, 1.0f, 0.0f), 120);
Quaternion orientation3 = Quaternion.axisAngle(new Vector3(0.0f, 1.0f, 0.0f), 240);
Quaternion orientation4 = Quaternion.axisAngle(new Vector3(0.0f, 1.0f, 0.0f), 360);
ObjectAnimator orbitAnimation = new ObjectAnimator();
orbitAnimation.setObjectValues(orientation1, orientation2, orientation3, orientation4);
orbitAnimation.setPropertyName("localRotation");
orbitAnimation.setEvaluator(new QuaternionEvaluator());
orbitAnimation.setRepeatCount(ObjectAnimator.INFINITE);
orbitAnimation.setRepeatMode(ObjectAnimator.RESTART);
orbitAnimation.setInterpolator(new LinearInterpolator());
orbitAnimation.setAutoCancel(true);
android arcore sceneform
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
The solarsystem case can make node rotate and I want to know how to animate an Object up and down?
This is the solarsystem case code:
Quaternion orientation1 = Quaternion.axisAngle(new Vector3(0.0f, 1.0f, 0.0f), 0);
Quaternion orientation2 = Quaternion.axisAngle(new Vector3(0.0f, 1.0f, 0.0f), 120);
Quaternion orientation3 = Quaternion.axisAngle(new Vector3(0.0f, 1.0f, 0.0f), 240);
Quaternion orientation4 = Quaternion.axisAngle(new Vector3(0.0f, 1.0f, 0.0f), 360);
ObjectAnimator orbitAnimation = new ObjectAnimator();
orbitAnimation.setObjectValues(orientation1, orientation2, orientation3, orientation4);
orbitAnimation.setPropertyName("localRotation");
orbitAnimation.setEvaluator(new QuaternionEvaluator());
orbitAnimation.setRepeatCount(ObjectAnimator.INFINITE);
orbitAnimation.setRepeatMode(ObjectAnimator.RESTART);
orbitAnimation.setInterpolator(new LinearInterpolator());
orbitAnimation.setAutoCancel(true);
android arcore sceneform
The solarsystem case can make node rotate and I want to know how to animate an Object up and down?
This is the solarsystem case code:
Quaternion orientation1 = Quaternion.axisAngle(new Vector3(0.0f, 1.0f, 0.0f), 0);
Quaternion orientation2 = Quaternion.axisAngle(new Vector3(0.0f, 1.0f, 0.0f), 120);
Quaternion orientation3 = Quaternion.axisAngle(new Vector3(0.0f, 1.0f, 0.0f), 240);
Quaternion orientation4 = Quaternion.axisAngle(new Vector3(0.0f, 1.0f, 0.0f), 360);
ObjectAnimator orbitAnimation = new ObjectAnimator();
orbitAnimation.setObjectValues(orientation1, orientation2, orientation3, orientation4);
orbitAnimation.setPropertyName("localRotation");
orbitAnimation.setEvaluator(new QuaternionEvaluator());
orbitAnimation.setRepeatCount(ObjectAnimator.INFINITE);
orbitAnimation.setRepeatMode(ObjectAnimator.RESTART);
orbitAnimation.setInterpolator(new LinearInterpolator());
orbitAnimation.setAutoCancel(true);
android arcore sceneform
android arcore sceneform
edited Nov 20 at 8:44
asked Nov 20 at 7:28
user10578038
212
212
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
0
down vote
I believe, It is the wrong consideration. Because ObjectAnimator can only animate subclass of View (like TextView, Button etc). But doesn't include Node.
According to Documentation,
A Node represents a transformation within the scene graph's hierarchy.
It can contain a renderable for the rendering engine to render.
You need more research about Node to make rotate
I modify the problem, can you please revisit it?
– user10578038
Nov 20 at 8:48
There was no attribute for View "localRotation". Please change View.rotationY or rotationX
– Lwin Myo Aung
Nov 20 at 9:14
add a comment |
up vote
0
down vote
I work in this code:
Vector3 vector1 = new Vector3(getRandom(), getRandom(), playNode.getLocalPosition().z);
ObjectAnimator dropAnimation = new ObjectAnimator();
dropAnimation.setObjectValues(vector1);
dropAnimation.setPropertyName("localPosition");
dropAnimation.setEvaluator(new Vector3Evaluator());
dropAnimation.setRepeatCount(ObjectAnimator.INFINITE);
dropAnimation.setRepeatMode(ObjectAnimator.RESTART);
dropAnimation.setInterpolator(new LinearInterpolator());
dropAnimation.setAutoCancel(true);
return dropAnimation;
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
I believe, It is the wrong consideration. Because ObjectAnimator can only animate subclass of View (like TextView, Button etc). But doesn't include Node.
According to Documentation,
A Node represents a transformation within the scene graph's hierarchy.
It can contain a renderable for the rendering engine to render.
You need more research about Node to make rotate
I modify the problem, can you please revisit it?
– user10578038
Nov 20 at 8:48
There was no attribute for View "localRotation". Please change View.rotationY or rotationX
– Lwin Myo Aung
Nov 20 at 9:14
add a comment |
up vote
0
down vote
I believe, It is the wrong consideration. Because ObjectAnimator can only animate subclass of View (like TextView, Button etc). But doesn't include Node.
According to Documentation,
A Node represents a transformation within the scene graph's hierarchy.
It can contain a renderable for the rendering engine to render.
You need more research about Node to make rotate
I modify the problem, can you please revisit it?
– user10578038
Nov 20 at 8:48
There was no attribute for View "localRotation". Please change View.rotationY or rotationX
– Lwin Myo Aung
Nov 20 at 9:14
add a comment |
up vote
0
down vote
up vote
0
down vote
I believe, It is the wrong consideration. Because ObjectAnimator can only animate subclass of View (like TextView, Button etc). But doesn't include Node.
According to Documentation,
A Node represents a transformation within the scene graph's hierarchy.
It can contain a renderable for the rendering engine to render.
You need more research about Node to make rotate
I believe, It is the wrong consideration. Because ObjectAnimator can only animate subclass of View (like TextView, Button etc). But doesn't include Node.
According to Documentation,
A Node represents a transformation within the scene graph's hierarchy.
It can contain a renderable for the rendering engine to render.
You need more research about Node to make rotate
answered Nov 20 at 7:54
Lwin Myo Aung
276115
276115
I modify the problem, can you please revisit it?
– user10578038
Nov 20 at 8:48
There was no attribute for View "localRotation". Please change View.rotationY or rotationX
– Lwin Myo Aung
Nov 20 at 9:14
add a comment |
I modify the problem, can you please revisit it?
– user10578038
Nov 20 at 8:48
There was no attribute for View "localRotation". Please change View.rotationY or rotationX
– Lwin Myo Aung
Nov 20 at 9:14
I modify the problem, can you please revisit it?
– user10578038
Nov 20 at 8:48
I modify the problem, can you please revisit it?
– user10578038
Nov 20 at 8:48
There was no attribute for View "localRotation". Please change View.rotationY or rotationX
– Lwin Myo Aung
Nov 20 at 9:14
There was no attribute for View "localRotation". Please change View.rotationY or rotationX
– Lwin Myo Aung
Nov 20 at 9:14
add a comment |
up vote
0
down vote
I work in this code:
Vector3 vector1 = new Vector3(getRandom(), getRandom(), playNode.getLocalPosition().z);
ObjectAnimator dropAnimation = new ObjectAnimator();
dropAnimation.setObjectValues(vector1);
dropAnimation.setPropertyName("localPosition");
dropAnimation.setEvaluator(new Vector3Evaluator());
dropAnimation.setRepeatCount(ObjectAnimator.INFINITE);
dropAnimation.setRepeatMode(ObjectAnimator.RESTART);
dropAnimation.setInterpolator(new LinearInterpolator());
dropAnimation.setAutoCancel(true);
return dropAnimation;
add a comment |
up vote
0
down vote
I work in this code:
Vector3 vector1 = new Vector3(getRandom(), getRandom(), playNode.getLocalPosition().z);
ObjectAnimator dropAnimation = new ObjectAnimator();
dropAnimation.setObjectValues(vector1);
dropAnimation.setPropertyName("localPosition");
dropAnimation.setEvaluator(new Vector3Evaluator());
dropAnimation.setRepeatCount(ObjectAnimator.INFINITE);
dropAnimation.setRepeatMode(ObjectAnimator.RESTART);
dropAnimation.setInterpolator(new LinearInterpolator());
dropAnimation.setAutoCancel(true);
return dropAnimation;
add a comment |
up vote
0
down vote
up vote
0
down vote
I work in this code:
Vector3 vector1 = new Vector3(getRandom(), getRandom(), playNode.getLocalPosition().z);
ObjectAnimator dropAnimation = new ObjectAnimator();
dropAnimation.setObjectValues(vector1);
dropAnimation.setPropertyName("localPosition");
dropAnimation.setEvaluator(new Vector3Evaluator());
dropAnimation.setRepeatCount(ObjectAnimator.INFINITE);
dropAnimation.setRepeatMode(ObjectAnimator.RESTART);
dropAnimation.setInterpolator(new LinearInterpolator());
dropAnimation.setAutoCancel(true);
return dropAnimation;
I work in this code:
Vector3 vector1 = new Vector3(getRandom(), getRandom(), playNode.getLocalPosition().z);
ObjectAnimator dropAnimation = new ObjectAnimator();
dropAnimation.setObjectValues(vector1);
dropAnimation.setPropertyName("localPosition");
dropAnimation.setEvaluator(new Vector3Evaluator());
dropAnimation.setRepeatCount(ObjectAnimator.INFINITE);
dropAnimation.setRepeatMode(ObjectAnimator.RESTART);
dropAnimation.setInterpolator(new LinearInterpolator());
dropAnimation.setAutoCancel(true);
return dropAnimation;
answered Nov 21 at 1:46
user10578038
212
212
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53388145%2fhow-to-make-the-node-translation%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown