Skip to content

Capsule Cast #183

Answered by RossNordby
ViachaslauBusel asked this question in Q&A
Discussion options

You must be logged in to vote

t is the time to impact, given the input sweep velocity. For example, for a pure linear sweep, if the velocity has a magnitude of 2 and the t value is 0.5, then the distance traveled to the impact is 2 * 0.5 = 1.

The t value is used instead of distance because distance ceases to be the most useful output when a sweep has nonzero angular velocity. For ray casts or linear-only sweeps, the time of impact can also be used to multiply the ray direction or linear velocity to get displacement easily.

(As a side note, in bepuphysics2, capsules do not take a full 'height' in their constructor- instead, it takes the length of the internal line segment. A capsule with 0 length would just behave like…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ViachaslauBusel
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