What is causing my velocity/ acceleration to differ from control rotation?
I have a round world. So I'm converting the character movement component to allow for this. I use
to give me the unrotated vector to compare against throughout the CMP. Alternatively I use
to give me the rotated vector for gravity and similar logic. On my character class on the tick function I adjust the characters control rotation so that the down vector of the capsule always points toward the planet center like so
Yet when I move my character around in the world I can see the velocity vector and acceleration vector start to diverge from the control rotation forward vector. You can see this in the screen shot. The screen grab shows the character moving "forward" or pressing the "w" key. The velocity and acceleration should point in the same vector as the control rotation. Now there's a lot inside the CMP so I could have missed something but I'm trying to narrow down where this is occurring at. Is it a result of the control rotation in my character class being incorrect? Am I adding those rotations together the wrong way? The blue line appears to be correct to me. So I'm guessing it's somewhere in the CMP, but for the life of me I cannot figure out where.
asked Jul 01 '16 at 01:59 PM in C++ Programming
Follow this question
Once you sign in you will be able to subscribe for any updates here