Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need c + + code this this question. MILESTONE 4 : FIRST CLASS ( 7 0 % + ) a . When randomly spawning
I need c code this this question. 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started