public override void GetInteractionShapeCreationInfo(out INTERACTION_CREATE_SHAPE_INFO createInfo, out INTERACTION_TRANSFORM createTransform) { createInfo = new INTERACTION_CREATE_SHAPE_INFO(); createInfo.shapeFlags = ShapeInfoFlags.None; createTransform = getRigidbodyTransform(); }
public override void Setup() { base.Setup(); INTERACTION_SPHERE_DESCRIPTION sphere = new INTERACTION_SPHERE_DESCRIPTION(); sphere.shape.type = ShapeType.Sphere; sphere.radius = 1.0f; IntPtr spherePtr = StructAllocator.AllocateStruct(ref sphere); InteractionC.AddShapeDescription(ref _scene, spherePtr, out _shapeDescriptionHandle); INTERACTION_CREATE_SHAPE_INFO info = new INTERACTION_CREATE_SHAPE_INFO(); info.shapeFlags = ShapeInfoFlags.None; INTERACTION_TRANSFORM transform = new INTERACTION_TRANSFORM(); transform.position = Vector3.zero.ToCVector(); transform.rotation = Quaternion.identity.ToCQuaternion(); transform.wallTime = 0; InteractionC.CreateShapeInstance(ref _scene, ref _shapeDescriptionHandle, ref transform, ref info, out _shapeInstanceHandle); }
/// <summary> /// Called by InteractionManager to get the creation info used to create the shape associated with this InteractionBehaviour. /// </summary> /// <param name="createInfo"></param> /// <param name="createTransform"></param> public abstract void GetInteractionShapeCreationInfo(out INTERACTION_CREATE_SHAPE_INFO createInfo, out INTERACTION_TRANSFORM createTransform);