-
-
Save alvarezgarcia/532c437cfc7645a6d429b15bce8814df to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JSONObject fromDirection = new JSONObject (); | |
fromDirection.AddField("x", Vector3.up.x); | |
fromDirection.AddField("y", Vector3.up.y); | |
fromDirection.AddField("z", Vector3.up.z); | |
JSONObject position = new JSONObject (); | |
position.AddField("x", contact.point.x); | |
position.AddField("y", contact.point.y); | |
position.AddField("z", contact.point.z); | |
JSONObject toDirection = new JSONObject (); | |
toDirection.AddField("x", contact.normal.x); | |
toDirection.AddField("y", contact.normal.y); | |
toDirection.AddField("z", contact.normal.z); | |
JSONObject json = new JSONObject(); | |
json.AddField("event", "instantiate"); | |
json.AddField("name", "energyExplosion"); | |
json.AddField ("fromDirection", fromDirection); | |
json.AddField ("toDirection", toDirection); | |
json.AddField ("position", position); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment