Created
January 22, 2016 00:57
-
-
Save caitlynmeeks/55f0ffbf8b2a10627a42 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
// Force all nearby dynamic entities to have gravity = -9 | |
arrayFound = Entities.findEntities(MyAvatar.position, 100.0) | |
print("Found some entities! These many: " + arrayFound.length); | |
for( i = 0; i < arrayFound.length; i++){ | |
var entProps = Entities.getEntityProperties(arrayFound[i]); | |
if (entProps.dynamic) | |
{ | |
print ("DYNAMIC"); | |
Entities.editEntity(arrayFound[i], {gravity : {"x":0,"y":-9,"z":0}}); | |
} else { | |
print ("NOT DYNAMIC "+entProps.ID); | |
} | |
} | |
//print (JSON.stringify(entProps)); | |
// Entities.editEntity(arrayFound[i], {gravity : {"x":0,"y":-9,"z":0}}); | |
// Entities.editEntity(arrayFound[i], {dynamic : 1}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment