Question: MILESTONE 4 : FIRST CLASS ( 7 0 % + ) a . When randomly spawning cubes, check to ensure that each cube is not
MILESTONE : FIRST CLASS
a When randomly spawning cubes, check to ensure that each cube is not within units
of other cubes orin collision with the sphere. As long as hint: while loop the cube
being spawned is within units of another cube or in collision with the sphere, a new
random position should be generated for the cube.
b Instead of hiding picked up cubes, respawn them at a new random position and
ensure that the checksin above are performed. Consider utilising a single function
for spawning and respawning cubes.
c Implement a "Hyper Mode" in which the sphere attracts cubes within a unit radius:
iii. Add a special cube using "minicube. and "hypercube.jpg as its skin at a
random position as in 'a'above.
iv On picking up the special cube, the sphere should transition into a "Hyper" state
and its skin shouldchange to "hypersphere.jpg The Hyper state should last for
seconds, after which the sphere should return to its "Regular" state.
v In the Hyper state, the sphere should attract cubes that are within
units from its centre"magnetically", attracted cubes should "fly" into the
sphere before they are respawned.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
