Sunday, April 14, 2013

Working on Ping


I had taken the ping task for the week's sprint. Last week I implemented the Inventory System of Thief side in Co-signers. The Inventory System has a record of all the tools that the thief acquires. It also has a time based renewal system which increases the count of all the tools on a time basis. Things present in Inventory System of Thief side includes the following tools and gadgets:
·      Candy
·      Camera Bug
·      EMP
·      Flash Bang

Here is how it looks:




For ping I took the Theif's rotation, which unity provides in degrees, and set the compass rotation to that of the thief rotation. Kiran was working on the Ping on the Hacker side. We decided to pass the position of ping in 2D( X and Z as the Y co-ordinate doesn't matter) from the hacker side to the thief side through the network. Whenever a hacker pings on his side, the thief side interface gets a position of the ping. I  have written the thief side script to normalize the difference of the thief position and the ping position and which gives me the direction of the ping and then multiply it with the distance which appears on the GUI compass and updates every frame for 15 seconds. It is a design decision to keep the ping active for 15 seconds.

No comments:

Post a Comment