bouncing
how to bounce with wall i mean by that reflecting velocity
if you want not sliding
if you have a sample of code
or a tuto
love and peace
love and peace
Here''s something simple: if you have the normal of the plane of your wall, then you can simply reverse the component of the speed that is parallel to that normal:
(all variables are vectors)
v'': final speed
v'' = v + Dot(N, v) * -N * k
where k is a coefficient of elasticity (or restitution) between 0 and 1. Dot is the dot product (or scalar product) of N and v.
You can find more complicated stuff, but this should be decent.
Cédric
(all variables are vectors)
v'': final speed
v'' = v + Dot(N, v) * -N * k
where k is a coefficient of elasticity (or restitution) between 0 and 1. Dot is the dot product (or scalar product) of N and v.
You can find more complicated stuff, but this should be decent.
Cédric
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement