Edited newerest So I fixed the flippidy flops by just setting a positive vector on the z axis and aligning the objects z to the positive z vector.
# ---- Applies movement to a vector which, based on nilunder Goran's edit of Planetary gravity, is difference between wasd sensors own.applyMovement(velocity,0) # ---- A vector that is Vector([0,0,1]) points up, and then this next line aligns the owners z axis (represented by 2) to this point up vect, immediately (represented by 1) own.alignAxisToVect(updown,2,1) # ---- this next line says, whatever the velocity vector is, the y axis of the owner object (represented by the first 1) immediately (represented by the second 1) is aligned to it own.alignAxisToVect(velocity,1,1)
Edited (newest) OKay so It is still doing flippidy flops when it ‘aligns the axis’ even though it says the objects x and y rotation are locked over on the object properties menu (with the lock icons). If yo know the answer to this, help me out, but yeah, that’s where I am at with this.
EDITED after Agoose posted: yo I’m dumb, I just align the axis to the vector I already had… I wish I could have answered this before people saw my stupidity. Anyway, yeah. So, I did that, and then it was doing all kind of flippy flops, so I just locked the x and y transformation. Ok thank you
So I see that I can align things to axis, positive y, positive x,
Why doesn’t ‘negative’ axis work for aligntoaxis, and can someone tell me what method I should be learning how to use instead to solve this problem?
The goal is to have playermovement relative to the global axis, and I was hoping to use aligntoaxis to do diagonal orientation. It works for when I can reference positive quadrants of course, but then you can’t enter ‘negative’ into the vectors.
if velocity: own.applyMovement(velocity,0) # ---- Point Right Top if velocity and velocity > 0: own.alignAxisToVect([1.0,1.0,0.0], 1, 1.0) #----- and then you can't do any more this way?