Post by j7 on May 6, 2020 3:19:49 GMT
Not sure if this is a PoolBoss or DOTTween pro problem.
I got PoolBoss to help optimise my project instead of creating and destorying objects, and ive found a problem.
Scenario
I have a Nested GameObject which has a path animation moving with 3 points, the object coming towards the player at 0,0,0 (Im using Playmaker but dont think that is a problem).
GameObject A (Transform reference Pos:0,0,0 / Rot:0,0,0 / Scale:1,1,1)
+Cube (Transform referene Pos:0,5,30 / Rot:0,0,0 / Scale:0.2,0.2,0.2)
++CubeAddtionalObjects
+Point A (Transform reference Pos:0,1.4,30 / Rot:0,0,0)
+Point B (Transform reference Pos:0,0,7 / Rot:0,0,0)
+Point C (Transform reference Pos:0,0,0 / Rot:0,0,0)
I Spawn the GameObject and then the Tween starts and moves the cube object along the 3 points, starting from the Cube Vector spawn position and rotation.
The animation follows the path correctly and then despawns.
I then spawn another copy of the GO, moving Cube it to its 'initial' vector spawn point and rotation.
It DotTween follows the path from the 3 points, and i then despawn again.
All this works fine, the same as i originally had when i just did a Create GameObject instead of Spawn GameObject
Now here is the problem / difference:
During the project running, I then change the GameObject A transform reference Rotate, Eg i want the object to now come from the front / right slightly, so i rotate the GameObject A along its Y axis, leaving all the other tween paths the same.
When i use Create GameObject - i get the result that i want, the new object starts a little to the right, and continues down its tween path towards the player in 3d space. (first screenshot)
When i use Spawn GameOject - The Cube starts at its new right location, but then moves to Point A, ignoring its GameObject A's transform. Eg it moves towards the player dead center. (second Screenshot)
Pausing the running and inspecting the Points, looks correct - eg Point A has rotated in both CreateObject and Spawn Object yet the tween seems to ignore the 'new' path.
Any ideas?
I got PoolBoss to help optimise my project instead of creating and destorying objects, and ive found a problem.
Scenario
I have a Nested GameObject which has a path animation moving with 3 points, the object coming towards the player at 0,0,0 (Im using Playmaker but dont think that is a problem).
GameObject A (Transform reference Pos:0,0,0 / Rot:0,0,0 / Scale:1,1,1)
+Cube (Transform referene Pos:0,5,30 / Rot:0,0,0 / Scale:0.2,0.2,0.2)
++CubeAddtionalObjects
+Point A (Transform reference Pos:0,1.4,30 / Rot:0,0,0)
+Point B (Transform reference Pos:0,0,7 / Rot:0,0,0)
+Point C (Transform reference Pos:0,0,0 / Rot:0,0,0)
I Spawn the GameObject and then the Tween starts and moves the cube object along the 3 points, starting from the Cube Vector spawn position and rotation.
The animation follows the path correctly and then despawns.
I then spawn another copy of the GO, moving Cube it to its 'initial' vector spawn point and rotation.
It DotTween follows the path from the 3 points, and i then despawn again.
All this works fine, the same as i originally had when i just did a Create GameObject instead of Spawn GameObject
Now here is the problem / difference:
During the project running, I then change the GameObject A transform reference Rotate, Eg i want the object to now come from the front / right slightly, so i rotate the GameObject A along its Y axis, leaving all the other tween paths the same.
When i use Create GameObject - i get the result that i want, the new object starts a little to the right, and continues down its tween path towards the player in 3d space. (first screenshot)
When i use Spawn GameOject - The Cube starts at its new right location, but then moves to Point A, ignoring its GameObject A's transform. Eg it moves towards the player dead center. (second Screenshot)
Pausing the running and inspecting the Points, looks correct - eg Point A has rotated in both CreateObject and Spawn Object yet the tween seems to ignore the 'new' path.
Any ideas?