Skip to content

Design for a program that calculates and illustrates the point of collision between a moving sphere and a stationary sphere. Written in C# for Unity.

Notifications You must be signed in to change notification settings

currant77/Sphere-Collision-Challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Sphere-Collision-Challenge

Design for a program that calculates and illustrates the point of collision between a moving sphere and a stationary sphere. Written in C# for Unity.

Instructions:

  • Use Q / A keys to increase / decrease the size of the moving sphere
  • Use W / S keys to increase / decrease the size of the stationary sphere
  • Use E/ D keys to increase / decrease the distance between the two spheres
  • Use arrow keys to adjust the direction of the moving sphere. Use right / left arrow keys to sweep the angle of movement horizontally; the up / down keys to sweep it vertically

Assumptions / Constraints:

  • Made both spheres so that they could not become smaller than MIN_DIAMETER is size (prevent sphere from disappearing or their scale becoming negative)
  • Made it so that the initial position of the two spheres could not intersect (collision doesn't really make sense if the sphere are already overlapping)
  • Restricted initial positions of the two spheres to a single axis, but this could easily be extended to a general case

About

Design for a program that calculates and illustrates the point of collision between a moving sphere and a stationary sphere. Written in C# for Unity.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages