-
25th January 2012, 12:51 PM
#11
Barrel rolls should not be that hard, if in Blender (I imagine similar in Unity too):
1>Animate the ship doing a barrel roll
2>Use a ray to detect how far off the floor you are
3>If the ray is a certain distance and the player has enough energy (plus pressing some buttons) play said animation and increase thrust a little
4> Check for collisons- if there is a collison before the animation finishes then there would be no speed boost. But, if all 100 frames played then you would get the boost (and a reduction in health).
Hyperthrust would be easy too:
1> Get the players linear velocity
2> If it is a certain speed (and the player holds a button) deduct health but increase speed temporarily.
Pits are simple- this was one of the first things I made (Xpand indirectly taught me how to do this when I was learning Blender):
Cast a ray downwards- if it hits a certain material or object with a certain property increase the health value/ property of the ship. If health >= 100 then health = 100.
Speed pads are similar- if you detect a certain property or material add a percentage speed increase to the velocity of the player.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules