For this week, I made a sphere of randomly spawned asteriods using a Random.insideUnitSpere * radius, which will randomly spawn asteriods assuming the transform[] is set within whatever I make the raduis, say for example I set radius equals 5, the 3 axis will equal 5 for the maximum size of the sphere and asteriods will be randomly placed inside. Several issues with the code Instantiate (asteriod[asteriodToSpawn], Random.insideUnitSphere * 150, Quaternion.LookRotation(center)); is that the insideUnitSphere * radius takes up the spot for any transform.position/rotate slot so I had to make a separate code for the actual movement of the asteriods. Which for the most part works, except I had to us addForce and using Random.value -0.5 for the xyz and put transform.Rotate(x,y,z) into the update function, putting it into fixed update causes it to go faster then what I would want it to, and using addTorque on the rotational axis even with the random variables in update, it builds up from slow then goes fast.
I was trying to get a randomrotate setup within the Start function but there is something missing, not sure what yet. But with what I have, when played the asteriods will go forward or backup based on the way it was facing and will also randomly rotate along an axis and each of the speeds for these is random, so some go faster then others or rotate faster.
A minor issue that came up is an asteriod will go in a circle, not all of them will but some do. A major issue is the asteriods go thru each other, though I wasn`t concerned with asteriods spawning on top of each other yet. I put a oncollisionenter funtion with a print and nothing prints, and I did put a cube inside the sphere with a rigidbody and when I move it around, it will bounce of the asteriods but the asteriods dont do much else. Overall, took longer this done then what I had to do last week. Around 4 hours.
Friday, March 25, 2011
Friday, March 18, 2011
Week 9
These are 3 teardrop asteriods, the ones that got approved. I`d say an hour was put into them. Also I was tasked with making an asteriod spawning array that randomly places asteriods inside a grid area in unity. Not understanding the array portion, I made 6 spawn points that would randomly spawn a random asteriod. After looking at the code and making it work for me, maybe an hour was spent working it out. After seeing the new code for what I was supposed to do, and spending 5 minutes on it, the 2 areas I need to deal with is making the grid area and setting the code to spawn random asteriods instead of just 1.
Friday, March 11, 2011
Week 8 Asteriods
Here are 10 modeled asteriods, could use a little more work, and took maybe 2 hours at most to make.
Thursday, March 3, 2011
Week 7&8
This includes the 3 faction symbols and the rocket and missile assets images. Overall, between the cleaning up the UV`s, and setting the textures took me 6-8 hours at most.
Subscribe to:
Posts (Atom)









