how can i use a button to change the length of a model?Math related: How do I get a different scale if the value is less than one or greater than oneScaling a ModelInstance in libgdx 3D and Bullet engineHow does scale change the object in three js?Scale button without affect other buttonsScaling a sprite by pressing buttons going too quicklyHow can I set the length of an edge in Maya via Python?I want to rotate and delete the 3d model in android using sceneform sdk through buttons instead of gestureshow to Place small node renderable on same position of bigger node renderable?Convert a scale to an integerHow to specifically scale model using pinch gesture in either lengthwise of bredthwise?
What is the German equivalent of the proverb 水清ければ魚棲まず (if the water is clear, fish won't live there)?
Does dual boot harm a laptop battery or reduce its life?
How to innovate in OR
Why does Canada require bilingualism in a lot of federal government posts?
Omnidirectional LED, is it possible?
Why is softmax function used to calculate probabilities although we can divide each value by the sum of the vector?
Can Lightning Lure be used to knock out a creature like a magical Taser?
What Marvel character has this 'W' symbol?
Unknown indication below upper stave
Why did House of Representatives need to condemn Trumps Tweets?
Why tantalum for the Hayabusa bullets?
Why does the Rust compiler not optimize code assuming that two mutable references cannot alias?
How does the Thief's Fast Hands feature interact with mundane and magical shields?
Why did I lose on time with 3 pawns vs Knight. Shouldn't it be a draw?
Is it safe if the neutral lead is exposed and disconnected?
A variant of the Multiple Traveling Salesman Problem
How well would the Moon protect the Earth from an Asteroid?
Should I intervene when a colleague in a different department makes students run laps as part of their grade?
Argand formula and more for quaternions?
GNU GPL V3 with no code change disclosure
How to efficiently shred a lot of cabbage?
Did Vladimir Lenin have a cat?
Surviving a planet collision?
Why did some Apollo missions carry a grenade launcher?
how can i use a button to change the length of a model?
Math related: How do I get a different scale if the value is less than one or greater than oneScaling a ModelInstance in libgdx 3D and Bullet engineHow does scale change the object in three js?Scale button without affect other buttonsScaling a sprite by pressing buttons going too quicklyHow can I set the length of an edge in Maya via Python?I want to rotate and delete the 3d model in android using sceneform sdk through buttons instead of gestureshow to Place small node renderable on same position of bigger node renderable?Convert a scale to an integerHow to specifically scale model using pinch gesture in either lengthwise of bredthwise?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I want to add a button that increases the length of my model by pressing it.
what i am currently doing is getting local scale of model . incrementing it by 0.5f and seting the local scale. but nothing is happening.
scale arcore sceneform
add a comment |
I want to add a button that increases the length of my model by pressing it.
what i am currently doing is getting local scale of model . incrementing it by 0.5f and seting the local scale. but nothing is happening.
scale arcore sceneform
add a comment |
I want to add a button that increases the length of my model by pressing it.
what i am currently doing is getting local scale of model . incrementing it by 0.5f and seting the local scale. but nothing is happening.
scale arcore sceneform
I want to add a button that increases the length of my model by pressing it.
what i am currently doing is getting local scale of model . incrementing it by 0.5f and seting the local scale. but nothing is happening.
scale arcore sceneform
scale arcore sceneform
asked Mar 26 at 20:21
Ishaan GuptaIshaan Gupta
209 bronze badges
209 bronze badges
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
You must set the scale to the node where you model is attached to:
Node node = new Node();
node.setParent(anchorNode);
node.setRenderable(yourRenderable);
button.setOnClickListener(v ->
//make the object twice as large
node.setLocalScale(new Vector3(2f, 2f, 2f));
);
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%2f55365634%2fhow-can-i-use-a-button-to-change-the-length-of-a-model%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You must set the scale to the node where you model is attached to:
Node node = new Node();
node.setParent(anchorNode);
node.setRenderable(yourRenderable);
button.setOnClickListener(v ->
//make the object twice as large
node.setLocalScale(new Vector3(2f, 2f, 2f));
);
add a comment |
You must set the scale to the node where you model is attached to:
Node node = new Node();
node.setParent(anchorNode);
node.setRenderable(yourRenderable);
button.setOnClickListener(v ->
//make the object twice as large
node.setLocalScale(new Vector3(2f, 2f, 2f));
);
add a comment |
You must set the scale to the node where you model is attached to:
Node node = new Node();
node.setParent(anchorNode);
node.setRenderable(yourRenderable);
button.setOnClickListener(v ->
//make the object twice as large
node.setLocalScale(new Vector3(2f, 2f, 2f));
);
You must set the scale to the node where you model is attached to:
Node node = new Node();
node.setParent(anchorNode);
node.setRenderable(yourRenderable);
button.setOnClickListener(v ->
//make the object twice as large
node.setLocalScale(new Vector3(2f, 2f, 2f));
);
answered Mar 28 at 18:47
Bobek BobekosBobek Bobekos
663 bronze badges
663 bronze badges
add a comment |
add a comment |
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
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%2f55365634%2fhow-can-i-use-a-button-to-change-the-length-of-a-model%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