private void Start() { if (!PhysicsNativePlugin.hasBeenEnabled) { PhysicsNativePlugin.CreatePhysicsWorld(); PhysicsNativePlugin.hasBeenEnabled = true; } // Initialize values Mass = mass; position = transform.position; inertiaTensor = InertiaTensor.GetInertiaTensor(this, shape, isHollow); rotation = transform.rotation; element = PhysicsNativePlugin.AddParticle(mass, position.x, position.y, position.z); }
// Start is called before the first frame update void Start() { PhysicsNativePlugin.CreatePhysicsWorld(); PhysicsNativePlugin.AddParticle("particle1", 0.5f); PhysicsNativePlugin.AddForceXToParticle("particle1", 20.0f); }