VelcroPhysics icon indicating copy to clipboard operation
VelcroPhysics copied to clipboard

Precalculate and cache normal of EdgeShape

Open Genbox opened this issue 8 years ago • 0 comments

Edge shapes are static, and as such we can precompute their normal. Raycasts against edge shapes needs the normal, and currently it is calculated on each call to RayCast(). Since we would like branchless code, I think it is better to precompute it and cache it.

Genbox avatar Apr 09 '17 01:04 Genbox