I have an gameObject instantiating at the position of the character controller’s camera along its z-axis at speed.
Problem is that when I move the character, the gameObject instantiates off its mark.
I think I know how to fix it by just adding the gameObject velocity and the character controller velocity together.
Only problem with that is that I can not figure out the character controllers’s velocity variable e.g. I have:
gameObject.velocity.x+= ???.velocity.x
Note: gameObject is placeholder for variable name.
Edit: I’m sorry if my question is unclear, I already have a object (Lets call this projectile) instantiating from the z-axis of character’s camera.
That fires fine, but what I am unsure about is how to make it so the projectile doesn’t stop going directly down z-axis when the character is moving.(momentum changing where projectile is aimed)
I am/was trying to find the character controller’s(component) velocity to stop the projectile being moved off course.
Edit 2:
Screenshot to try to help clear things up. [2604-problem+screenshot.png|2604]
Is this what you wanted?