How to make the node translation?
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 |
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 |
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 '18 at 8:44
user10578038
asked Nov 20 '18 at 7:28
user10578038user10578038
314
314
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
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 '18 at 8:48
There was no attribute for View "localRotation". Please change View.rotationY or rotationX
– Lwin Myo Aung
Nov 20 '18 at 9:14
add a comment |
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 |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
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 '18 at 8:48
There was no attribute for View "localRotation". Please change View.rotationY or rotationX
– Lwin Myo Aung
Nov 20 '18 at 9:14
add a comment |
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 '18 at 8:48
There was no attribute for View "localRotation". Please change View.rotationY or rotationX
– Lwin Myo Aung
Nov 20 '18 at 9:14
add a comment |
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 '18 at 7:54
Lwin Myo AungLwin Myo Aung
341117
341117
I modify the problem, can you please revisit it?
– user10578038
Nov 20 '18 at 8:48
There was no attribute for View "localRotation". Please change View.rotationY or rotationX
– Lwin Myo Aung
Nov 20 '18 at 9:14
add a comment |
I modify the problem, can you please revisit it?
– user10578038
Nov 20 '18 at 8:48
There was no attribute for View "localRotation". Please change View.rotationY or rotationX
– Lwin Myo Aung
Nov 20 '18 at 9:14
I modify the problem, can you please revisit it?
– user10578038
Nov 20 '18 at 8:48
I modify the problem, can you please revisit it?
– user10578038
Nov 20 '18 at 8:48
There was no attribute for View "localRotation". Please change View.rotationY or rotationX
– Lwin Myo Aung
Nov 20 '18 at 9:14
There was no attribute for View "localRotation". Please change View.rotationY or rotationX
– Lwin Myo Aung
Nov 20 '18 at 9:14
add a comment |
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 |
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 |
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 '18 at 1:46
user10578038user10578038
314
314
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.
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