MCPcopy Create free account
hub / github.com/csaez/mscreen / bounce

Function bounce

tests/test_stress.py:153–166  ·  view source on GitHub ↗
(particleSystem, p, groundLevel=0.0)

Source from the content-addressed store, hash-verified

151
152
153def bounce(particleSystem, p, groundLevel=0.0):
154 if p.position.y > groundLevel:
155 return ZERO_VECTOR
156
157 f = om2.MVector()
158 f.y = -1.5 * p.velocity.y
159 p.position = om2.MVector(
160 p.position.x, groundLevel + 0.01, p.position.z)
161
162 coll = particleSystem.addPoint(state=1)
163 coll.position = om2.MVector(p.position)
164 coll.color = mscreen.COLOR_GRAY
165 coll.size = 2
166 return f
167
168
169def scaleUp(p):

Callers 1

test_stress.pyFile · 0.85

Calls 1

addPointMethod · 0.80

Tested by

no test coverage detected