Skip to content

Forward Vector for character #868

Answered by SirLynix
ktimam asked this question in Q&A
Jan 9, 2024 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Take its quaternion rotation and multiply it by your forward.
For example:

JPH::Vec3 charForward = character.GetRotation() * JPH::Vec3(0, 0, -1); // assuming Y up and right-handed, (0,0,1) for left-handed

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@eliasdaler
Comment options

@jrouwe
Comment options

Answer selected by ktimam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants