Created
January 18, 2018 03:47
-
-
Save rdelrosario/376a17191f8a38e451e91137a241d68f to your computer and use it in GitHub Desktop.
PokemonFromFile
This file contains hidden or 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
SCNNode CreatePokemonNodeFromFile(string filePath,string nodeName,SCNVector3 vector) | |
{ | |
var pScene = SCNScene.FromFile(filePath); | |
var pokemon = pScene.RootNode.FindChildNode(nodeName, true); | |
pokemon.Position = vector; | |
pokemon.PhysicsBody = SCNPhysicsBody.CreateStaticBody(); | |
pokemon.PhysicsBody.PhysicsShape = SCNPhysicsShape.Create(pokemon); | |
pokemon.PhysicsBody.ContactTestBitMask = (int)BitMaskCategory.Pokeball; | |
pokemon.PhysicsBody.CategoryBitMask = (int)BitMaskCategory.Pokemon; | |
return pokemon; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment