I created a custom component for composer pro in which I have several variables I need an entity to have.
The idea is to add this component to some 3d models and save them as usdz’s then I load these usdz’s in code and do specific things depending on these variables.
The component shows up in composer fine and I can set variables there. The problem is that the values I set in composer are different that what is shown in code. lets say in composer I set canMove = true. then when I read in code is set to false. I don’t know if I’m missing something
public struct MyObjectComponent: Component, Codable
{
public var affectAll: Bool = false
public var affectFloor: Bool = false
public var canMove: Bool = false
public var moveX: Bool = false
public var moveY: Bool = false
public var moveZ: Bool = false
public var canRotate: Bool = false
public var rotateX: Bool = false
public var rotateY: Bool = false
public var rotateZ: Bool = false
public init() {
}
}
Any help appreciated.
Guillermo