ARKit node frame incorrect size Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!UIScrollView Scrollable Content Size AmbiguityHow cast a node from other file than GameScene?How to detect vertical planes in ARKit?Adding a texture to a node programmatically ARKitHow to pin multiple SKNodes on one ARAnchor?Access node name in ARKitARKit after rotate node change position dynamicallyAdd plane nodes to ARKit scene vertically and horizontallyHow to animate from node in ARKit to actual viewEnter in a node and it disappears Arkit
Why wasn't DOSKEY integrated with COMMAND.COM?
When the Haste spell ends on a creature, do attackers have advantage against that creature?
Is it fair for a professor to grade us on the possession of past papers?
How can I use the Python library networkx from Mathematica?
Wu formula for manifolds with boundary
2001: A Space Odyssey's use of the song "Daisy Bell" (Bicycle Built for Two); life imitates art or vice-versa?
How do I stop a creek from eroding my steep embankment?
How does the math work when buying airline miles?
Maximum summed powersets with non-adjacent items
When a candle burns, why does the top of wick glow if bottom of flame is hottest?
Can you use the Shield Master feat to shove someone before you make an attack by using a Readied action?
Around usage results
Do jazz musicians improvise on the parent scale in addition to the chord-scales?
Do I really need recursive chmod to restrict access to a folder?
Fundamental Solution of the Pell Equation
What do you call the main part of a joke?
How come Sam didn't become Lord of Horn Hill?
What is homebrew?
Is it ethical to give a final exam after the professor has quit before teaching the remaining chapters of the course?
Why didn't Eitri join the fight?
What does the "x" in "x86" represent?
Compare a given version number in the form major.minor.build.patch and see if one is less than the other
What causes the direction of lightning flashes?
If a VARCHAR(MAX) column is included in an index, is the entire value always stored in the index page(s)?
ARKit node frame incorrect size
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Data science time! April 2019 and salary with experience
The Ask Question Wizard is Live!UIScrollView Scrollable Content Size AmbiguityHow cast a node from other file than GameScene?How to detect vertical planes in ARKit?Adding a texture to a node programmatically ARKitHow to pin multiple SKNodes on one ARAnchor?Access node name in ARKitARKit after rotate node change position dynamicallyAdd plane nodes to ARKit scene vertically and horizontallyHow to animate from node in ARKit to actual viewEnter in a node and it disappears Arkit
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I'm using ARKit
with Spritekit
. Basically, I have this old non-ARKit
Spritekit
game and I want to put the entire user interface in AR
so it looks like a screen floating in the air. Currently what I did was putting all the nodes I had under the scene
in a container node
. In the view controller, I just have
func view(_ view: ARSKView, nodeFor anchor: ARAnchor) -> SKNode?
let bgNode = sceneView.scene?.childNode(withName: "bg")
bgNode?.removeFromParent()
return bgNode
But, when it shows up, it gets compressed into a square with a size about 800x800
. Also, if I try to add nodes to the container node programmatically, it's not showing up properly. I also tried scaling it up to the correct size after it is added but it doesn't seemed to have automatically went back to wrong size. What is the issue here? Code for adding a node to container node in didMove
(circle was initialised at top as instance variable):
circle.strokeColor = UIColor(red: 87/255, green: 87/255, blue: 87/255, alpha: 1)
circle.lineWidth = 5.0
circle.name = "sling"
circle.position = CGPoint(x: bgNode.frame.width/2, y: bgNode.frame.height/2)
bgNode.addChild(circle)
ios swift arkit
add a comment |
I'm using ARKit
with Spritekit
. Basically, I have this old non-ARKit
Spritekit
game and I want to put the entire user interface in AR
so it looks like a screen floating in the air. Currently what I did was putting all the nodes I had under the scene
in a container node
. In the view controller, I just have
func view(_ view: ARSKView, nodeFor anchor: ARAnchor) -> SKNode?
let bgNode = sceneView.scene?.childNode(withName: "bg")
bgNode?.removeFromParent()
return bgNode
But, when it shows up, it gets compressed into a square with a size about 800x800
. Also, if I try to add nodes to the container node programmatically, it's not showing up properly. I also tried scaling it up to the correct size after it is added but it doesn't seemed to have automatically went back to wrong size. What is the issue here? Code for adding a node to container node in didMove
(circle was initialised at top as instance variable):
circle.strokeColor = UIColor(red: 87/255, green: 87/255, blue: 87/255, alpha: 1)
circle.lineWidth = 5.0
circle.name = "sling"
circle.position = CGPoint(x: bgNode.frame.width/2, y: bgNode.frame.height/2)
bgNode.addChild(circle)
ios swift arkit
add a comment |
I'm using ARKit
with Spritekit
. Basically, I have this old non-ARKit
Spritekit
game and I want to put the entire user interface in AR
so it looks like a screen floating in the air. Currently what I did was putting all the nodes I had under the scene
in a container node
. In the view controller, I just have
func view(_ view: ARSKView, nodeFor anchor: ARAnchor) -> SKNode?
let bgNode = sceneView.scene?.childNode(withName: "bg")
bgNode?.removeFromParent()
return bgNode
But, when it shows up, it gets compressed into a square with a size about 800x800
. Also, if I try to add nodes to the container node programmatically, it's not showing up properly. I also tried scaling it up to the correct size after it is added but it doesn't seemed to have automatically went back to wrong size. What is the issue here? Code for adding a node to container node in didMove
(circle was initialised at top as instance variable):
circle.strokeColor = UIColor(red: 87/255, green: 87/255, blue: 87/255, alpha: 1)
circle.lineWidth = 5.0
circle.name = "sling"
circle.position = CGPoint(x: bgNode.frame.width/2, y: bgNode.frame.height/2)
bgNode.addChild(circle)
ios swift arkit
I'm using ARKit
with Spritekit
. Basically, I have this old non-ARKit
Spritekit
game and I want to put the entire user interface in AR
so it looks like a screen floating in the air. Currently what I did was putting all the nodes I had under the scene
in a container node
. In the view controller, I just have
func view(_ view: ARSKView, nodeFor anchor: ARAnchor) -> SKNode?
let bgNode = sceneView.scene?.childNode(withName: "bg")
bgNode?.removeFromParent()
return bgNode
But, when it shows up, it gets compressed into a square with a size about 800x800
. Also, if I try to add nodes to the container node programmatically, it's not showing up properly. I also tried scaling it up to the correct size after it is added but it doesn't seemed to have automatically went back to wrong size. What is the issue here? Code for adding a node to container node in didMove
(circle was initialised at top as instance variable):
circle.strokeColor = UIColor(red: 87/255, green: 87/255, blue: 87/255, alpha: 1)
circle.lineWidth = 5.0
circle.name = "sling"
circle.position = CGPoint(x: bgNode.frame.width/2, y: bgNode.frame.height/2)
bgNode.addChild(circle)
ios swift arkit
ios swift arkit
edited Mar 22 at 9:47
Kaushik Makwana
977723
977723
asked Mar 22 at 9:37
Pirlo LochisomoPirlo Lochisomo
7510
7510
add a comment |
add a comment |
0
active
oldest
votes
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%2f55296679%2farkit-node-frame-incorrect-size%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%2f55296679%2farkit-node-frame-incorrect-size%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