It looks like you're new here. If you want to get involved, click one of these buttons!

I’ve got a Codea scene in craft where I am tweening a couple of spheres going around a path, but I would like to do some rotations, but no matter what I put into the tweening code the spheres do not rotate at all.

Here’s a sample of my tweening code.

t1 = tween(1.0, myEntity1, {scale (.5,.5,.5), x = -1, y = -.25, z = 6,}, tween.easing.linear)

t2 = tween(.1, myEntity1, {rotate (30,0,0,1), scale = vec3(.8,.4,.25), x = -1, y = -.5, z= 6}, tween.easing.linear)

t3 = tween(1.0, myEntity1, {scale = vec3(.3,.8,.3), x = -1, y = 3, z = 10}, tween.easing.linear)

t4 = tween(1.0, myEntity1, {scale = vec3(.5,.5,.5), x = 1, y = 3, z = 10}, tween.easing.linear)

t5 = tween(1.0, myEntity1, {x = 1, y = 1, z = 3}, tween.easing.linear)

t6 = tween(1.0, myEntity1, {x = -1, y = 1, z = 3}, tween.easing.linear)

Tagged:

## Comments

@Kurall_Creator Here’s an example of a cube. The tweens change the cube position and rotation.

Thank you so much.

I’m envisioning an animation where a couple of primitives will start attacking each other, and I’ve got rotations working perfectly within my original tween sequence.

Thank you so much for your help!

t7 = tween(1.0, myEntity2, {scale = vec3(.5, .5, .5), x = 0, y = -.25, z = 3}, tween.easing.linear)

t8 = tween(4,rot, {x=360,y=720,z=1080}, tween.easing.linear)

t9 = tween(.1, myEntity2, {scale = vec3 (.8, .4, .25), x = 0, y = -.5, z = 3}, tween.easing.linear)

t10 = tween(1.0, myEntity2, {scale = vec3 (.3, .8, .3), x = -1, y = 1, z = 3}, tween.easing.linear)

t11 = tween(1.0, myEntity2, {scale = vec3 (.5,.5,.5), x = -1, y = 3, z = 10}, tween.easing.linear)

t12 = tween(1.0, myEntity2, {x = 1, y = 3, z = 10}, tween.easing.linear)

t13 = tween(1.0, myEntity2, {x = 1, y = 1, z = 3}, tween.easing.linear)