Hi!
I want to change node x and y worldPosition properties. I’m using this code but it’s not work
tween(this.node)
.target(this.node)
.parallel(
tween(this.node.worldPosition)
.by(tweenDuration, {
x: 10
}, {
onUpdate: (target, ratio: number) => {
}
}),
tween(this.node.worldPosition)
.by(tweenDuration, {
y: -10
}, {
onUpdate: (target, ratio: number) => {
this.node.setWorldPosition(target)
}
})
.union()
)
.start()
Can’t I change target type of nested tween? It’s okay for this case to change tween(this.node) to tween(this.node.worldPosition). What should I do in case of changing both position and rotation for example?