Skip to content

Adjusting velocity of virtual character controller after collision #1474

Answered by jrouwe
zopsicle asked this question in Q&A
Discussion options

You must be logged in to vote

CharacterVirtual doesn't store this information, but what I'm using is simply:

Vec3 old_position = character->GetPosition();
character->Update(...)
Vec3 new_position = character->GetPosition();
Vec3 velocity = (new_position - old_position) / delta_time;

To calculate the effective velocity during the step.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@zopsicle
Comment options

@zopsicle
Comment options

@jrouwe
Comment options

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