Post

Replies

Boosts

Views

Activity

Comment on SceneKit custom physics fields using wrong position?
Thank you, Greg, for confirming I wasn't pushing the wrong button somewhere. Regarding the workaround, I can see how this code would work in a closure (with access to ballNode). However – as you may imagine – my actual physics simulator is a bit more complicated and stored in a separate file. I'm guessing there is no way to access the node's attributes when the customField calculations are in a method located elsewhere?
Topic: Graphics & Games SubTopic: SceneKit Tags:
Nov ’24
Comment on SCNSceneRendererDelegate example in SwiftUI?
This section from the Swift Programming Language documentation might add some more information. Essentially the rule is you can't use any part of self until the type is fully formed.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’24
Comment on SceneKit custom physics fields using wrong position?
Thank you, Greg, for confirming I wasn't pushing the wrong button somewhere. Regarding the workaround, I can see how this code would work in a closure (with access to ballNode). However – as you may imagine – my actual physics simulator is a bit more complicated and stored in a separate file. I'm guessing there is no way to access the node's attributes when the customField calculations are in a method located elsewhere?
Topic: Graphics & Games SubTopic: SceneKit Tags:
Replies
Boosts
Views
Activity
Nov ’24
Comment on SceneKit custom physics fields using wrong position?
Actually, the workaround above won't work either – it works in this case when the field source is also the target node (the position will always be a zero vector) however the target needs to know its position relative to the field source.
Topic: Graphics & Games SubTopic: SceneKit Tags:
Replies
Boosts
Views
Activity
Nov ’24
Comment on Using Dynamic Member Lookup in a Superclass
Am I supposed to close it? I figured closing it flags the problem is solved.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’25