[SOLVED] Beginner coder not sure whats wrong with my code

Like the title say am not sure whats wrong with my code at line 42 and 43. While the script is going through the for loop it clones a cube each time and the moves it. Tried to add .setRotation the cube doesn’t show up not sure whats wrong


am pretty bad with responding

Edits:Links because it seems like a good idea

This is what I see when I launch your application:

What exactly is wrong what are you trying to do?

So i made a for loop that clones a box then goes through the if statements and depending on the current loop number moves it left, forward, or right. I wanted to add rotation to the clone but when I add .setRotation the third clone disappears. Am not sure why and I was hoping some one with more experience would be able to help explain why the cube failed to show

sorry if this isn’t enough

The problem is that you are calling setRotation passing it 3 floats, instead of a pc.Quat. If you want to set euler angles you should call setEulerAngles instead.

Thank you. I knew of them but never used them. Now I am gonna try to better my understanding of quaternions.