I found a very weired issue, if only one motion, it works. then I add an other motion(name), the first motion would not work.
And debug console.log the motion & curve(position) value, they became to undefined:
But when I changed the curve position value a little bit(any data), (such as from 3 to 3.1)
Then run project again, the motion(position) works again. pls find the following console.log capture,
If I deleted the second motion(name), it happens again.
LeXXik
October 23, 2024, 9:29am
2
I can’t reproduce it in a blank project. Can you make an example project that shows the issue?
LeXXik
October 24, 2024, 11:35am
4
What are the steps to reproduce it in the project you gave?
The first step, you can see the motion script in the “box” entity, it has only 1 attribute object.
Launch the project and click “play”/“stop”, the motion runs correctly.
Second step, add one more attribute object, then the motion can’t be played.
And debug console.log the motion & curve(position) value, they became to undefined:
But when I changed the curve position value a little bit(any number), (such as from 3 to 3.1)
the motion(position) works again. pls find the following console.log capture,
pls find the following console.log capture,
If I deleted the second motion attributes, it happens again.
1 Like
LeXXik
October 25, 2024, 1:41pm
6
Thank you for the step-by-step guide. I was able to reproduce it. Its definitely a bug and I created a ticket to track it:
opened 01:41PM - 25 Oct 24 UTC
Under some conditions, the Editor creates a `Curve` instead of a `CurveSet`, whi… ch breaks the app.
Forum: https://forum.playcanvas.com/t/weird-issues-with-the-curve-attribute-in-editor/38029/5
Repro: https://playcanvas.com/project/1269201/overview/curve-set-issue
Steps:
1. Launch app, and click Play in UI.
2. Depending on the current state in Editor, the box will animate or not.
3. Select the box in Editor and add a new array element to the motion script attribute (keep defaults).
4. Launch app, and click Play in UI screen. The box will fail to animate, as the Editor create a `Curve`, instead of `CurveSet` for position field.
1 Like
Thank you for the kindly help. Hope the bug will be solved soon.