Questions tagged [scntext]

An SCNText object is a geometry that creates its contents from a string of text, rendered in 2D and optionally extruded to create a three-dimensional object.

An SCNText object is a geometry that creates its contents from a string of text, rendered in 2D and optionally extruded to create a three-dimensional object.

You provide text for the geometry using an NSString or NSAttributedString object. In the former case, the properties of the SCNText object determine the style and formatting of the entire body of text. When you create a text geometry from an attributed string, SceneKit styles the text according to the attributes in the string, and the properties of the SCNText object determine the default style for portions of the string that have no style attributes. SceneKit can create text geometry using any font and style supported by the Core Text framework, with the exception of bitmap fonts (such as those that define color emoji characters).

30 questions
1
vote
1 answer

Adding Text to SCNSphere

Good afternoon, Firstly, please forgive my (probably) very basic question, I am fairly new to the world of AR... I am playing about with displaying 3D objects when the user taps the screen. I have successfully projected a bubble-like object into a…
evorg88
  • 215
  • 2
  • 12
1
vote
1 answer

Changing certain words' colour in SCNText

I have an SCNText which I display in AR app, But I'd like certain words to be a different colour. I've tried doing the following: How to change colour of the certain words in label - Swift 3 but NSString and labels are different to SCN (of course),…
1
vote
1 answer

textSize property of SCNText is missing

I want to add a SCNPlane around the SCNText in ARSCNView. therefore I need the textSize of a text which I have created with SCNText like: as you can see from the image, there is an error which indicate that the SCNText has no member…
Mina
  • 2,167
  • 2
  • 25
  • 32
1
vote
1 answer

SCNText getBoundingBoxMin:max: always zero

I am trying to determine the bounding box of a SCNText but getBoundingBoxMin:max: always gives me zero. This is the code that runs inside a SCNText class extension, so self is the [textNode geometry]. [self setString:newText]; SCNVector3 min =…
Duck
  • 34,902
  • 47
  • 248
  • 470
0
votes
1 answer

SCNText ignores NSAttributedString attributes

Although the docs claim that SceneKit's SCNText works with NSAttributedString, the following NSAttributedString attributes seem to be ignored completely (and perhaps others, too): shadow strokeColor strokeWidth foregroundColor SCNText does obey…
West1
  • 1,430
  • 16
  • 27
0
votes
1 answer

Scenekit timers interfering with each other

I'm currently creating a game that uses several different timers to increase several numbers, displayed as 3D Text, on the screen simultaneously. When only one number on the screen is present it works perfectly and the number counts up pretty…
0
votes
1 answer

How to calculate the distance between a SCNText's Center and its Left and Right Corners

How can I calculate distance between SCNText center and its left edge corner and its right edge corner. For eg using the code below, if the word was "texas" the middle of the letter "x" would be the pivot point because it's in the middle of the…
Lance Samaria
  • 17,576
  • 18
  • 108
  • 256
0
votes
2 answers

SceneKit: text node font not applying

Can't find any issue about this, so: SceneKit, Xcode 10.1 Applying font to SCNText: Result: Even when I'm: textNode.geometry?.font = UIFont(name: "SF Mono Heavy", size: 170) it is still in default font look. I'm also tried a lot of other different…
0
votes
1 answer

How to get Float value from SCNText iOS?

I am not getting How to get float value from SCNText.If I print the SCNText.string I am able to see string in SCNText.Now I want like SCNText has float value flowed by characters, my requirement is extract float value from SCNText.I am getting how…
yuvaraju
  • 167
  • 1
  • 10
0
votes
1 answer

Is it normal that if a node is scaled the contained bounding box of scntext is not too?

I have been looking to display some text using arkit. To achieve this I have created an SCNText object, given it a font size and scaled it down. This appears to be the recommended way to regulate its size. Now for the positioning I need to…
Sam
  • 51
  • 1
  • 7
0
votes
1 answer

SCNText won't show

Before stating what my problem is I want to clarify that there are multiple answers to my question out there, unfortunately, none of them is solving my problem. Please don't mark this as a duplicate. Now this is the code I have to create my text…
Vollan
  • 1,887
  • 11
  • 26
0
votes
1 answer

How to Auto-Size a Background for 3D text in ARKit

I am trying to generate a background that automatically conforms to the size of the 3D that my program generates using ARKit. Is their a way to do that using swift/xCode or is there a way to calculate what size the background would have to be? For…
user9242640
  • 103
  • 1
  • 3
0
votes
1 answer

SCNText Not Displaying Emoji's - ARKit in Swift

I'm making an app that adds an SCNText to the ARSCNView I've created called sceneView. The text displays perfectly like this: (when the SCNText(string: "Test", extrusionDepth: CGFloat(0.01))) screenshot1: but when the SCNText(string: "Test",…
mkehoe
  • 11
  • 4
0
votes
1 answer

Displaying live information in 3d using arkit, possibly using scntext

I have been trying to get this to work for 3 days now. For my project I need to display changing values as 3d text rendered in an AR application written in Swift for iOS. What I already found: I can use the following code to generate a static text…
Sam
  • 51
  • 1
  • 7
0
votes
1 answer

SKLabelNode Hit Test

When conducting a hit test on an ARSCNView containing SCNNodes with SCNText geometry, it appears that the hit test will only be successful if the point tested lies inside a letter in the SCNText. This is not optimal, as it makes the nodes harder to…
1
2