Esempio n. 1
0
        /// <summary>
        /// Set the rotation of the component relative to its parent and force RelativeRotation to be equal to new rotation.
        /// This allows us to set and save Rotators with angles out side the normalized range, Note that doing so may break the
        /// RotatorCache so use with care.
        /// </summary>
        /// <param name="newRotation"></param>
        /// <param name="hitResult">Hit result from any impact if sweep is true.</param>
        /// <param name="sweep">Whether we sweep to the destination (currently not supported for rotation).</param>
        /// <param name="teleport">Whether we teleport the physics state (if physics collision is enabled for this object).
        /// If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location).
        /// If false, physics velocity is updated based on the change in position (affecting ragdoll parts).</param>
        public unsafe void SetRelativeRotationExact(FRotator newRotation, out FHitResult hitResult, bool sweep = false, ETeleportType teleport = ETeleportType.None)
        {
            byte *buff = stackalloc byte[StructDefault <FHitResult> .Size];

            Native_USceneComponent.SetRelativeRotationExactHR(this.Address, ref newRotation, sweep, (IntPtr)buff, (int)teleport);
            hitResult = new FHitResult((IntPtr)buff);
        }
Esempio n. 2
0
        public unsafe bool MoveComponent(FVector delta, FRotator newRotation, bool sweep, out FHitResult hit, EMoveComponentFlags moveFlags = EMoveComponentFlags.NoFlags, ETeleportType teleport = ETeleportType.None)
        {
            byte *buff   = stackalloc byte[StructDefault <FHitResult> .Size];
            bool  result = Native_USceneComponent.MoveComponentRot(this.Address, ref delta, ref newRotation, sweep, (IntPtr)buff, (int)moveFlags, (int)teleport);

            hit = new FHitResult((IntPtr)buff);
            return(result);
        }
 public void SetupAttachment(USceneComponent parent, FName socketName)
 {
     Native_USceneComponent.SetupAttachment(Address, parent.Address, ref socketName);
 }
Esempio n. 4
0
 /// <summary>
 /// Set the rotation of the component relative to its parent
 /// </summary>
 /// <param name="newRotation">New rotation of the component relative to its parent</param>
 /// <param name="sweep">Whether we sweep to the destination (currently not supported for rotation).</param>
 /// <param name="teleport">Whether we teleport the physics state (if physics collision is enabled for this object).
 /// If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location).
 /// If false, physics velocity is updated based on the change in position (affecting ragdoll parts).</param>
 public void SetRelativeRotation(FQuat newRotation, bool sweep = false, ETeleportType teleport = ETeleportType.None)
 {
     Native_USceneComponent.SetRelativeRotationQuat(this.Address, ref newRotation, sweep, (int)teleport);
 }
Esempio n. 5
0
 /// <summary>
 /// Set the location of the component relative to its parent
 /// </summary>
 /// <param name="newLocation">New location of the component relative to its parent.		</param>
 /// <param name="sweep">Whether we sweep to the destination location, triggering overlaps along the way and stopping short of the target if blocked by something.
 /// Only the root component is swept and checked for blocking collision, child components move without sweeping. If collision is off, this has no effect.</param>
 /// <param name="teleport">Whether we teleport the physics state (if physics collision is enabled for this object).
 /// If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location).
 /// If false, physics velocity is updated based on the change in position (affecting ragdoll parts).
 /// If CCD is on and not teleporting, this will affect objects along the entire sweep volume.</param>
 public void SetRelativeLocation(FVector newLocation, bool sweep = false, ETeleportType teleport = ETeleportType.None)
 {
     Native_USceneComponent.SetRelativeLocation(this.Address, ref newLocation, sweep, (int)teleport);
 }
Esempio n. 6
0
 public bool MoveComponent(FVector delta, FRotator newRotation, bool sweep, EMoveComponentFlags moveFlags = EMoveComponentFlags.NoFlags, ETeleportType teleport = ETeleportType.None)
 {
     return(Native_USceneComponent.MoveComponentRotNoHit(this.Address, ref delta, ref newRotation, sweep, (int)moveFlags, (int)teleport));
 }
Esempio n. 7
0
 /// <summary>
 /// Adds a delta to the transform of the component in world space. Scale is unchanged.
 /// </summary>
 /// <param name="deltaTransform">Change in transform in world space for the component. Scale is unchanged.</param>
 /// <param name="sweep">Whether we sweep to the destination location, triggering overlaps along the way and stopping short of the target if blocked by something.
 /// Only the root component is swept and checked for blocking collision, child components move without sweeping. If collision is off, this has no effect.</param>
 /// <param name="teleport">Whether we teleport the physics state (if physics collision is enabled for this object).
 /// If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location).
 /// If false, physics velocity is updated based on the change in position (affecting ragdoll parts).
 /// If CCD is on and not teleporting, this will affect objects along the entire sweep volume.</param>
 public void AddWorldTransform(FTransform deltaTransform, bool sweep = false, ETeleportType teleport = ETeleportType.None)
 {
     Native_USceneComponent.AddWorldTransform(this.Address, ref deltaTransform, sweep, (int)teleport);
 }
Esempio n. 8
0
 /// <summary>
 /// Adds a delta to the rotation of the component in world space.
 /// </summary>
 /// <param name="deltaRotation">Change in rotation in world space for the component.</param>
 /// <param name="sweep">Whether we sweep to the destination (currently not supported for rotation).</param>
 /// <param name="teleport">Whether we teleport the physics state (if physics collision is enabled for this object).
 /// If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location).
 /// If false, physics velocity is updated based on the change in position (affecting ragdoll parts).
 /// If CCD is on and not teleporting, this will affect objects along the entire sweep volume.</param>
 public void AddWorldRotation(FQuat deltaRotation, bool sweep = false, ETeleportType teleport = ETeleportType.None)
 {
     Native_USceneComponent.AddWorldRotationQuat(this.Address, ref deltaRotation, sweep, (int)teleport);
 }
Esempio n. 9
0
 /// <summary>
 /// Adds a delta to the location of the component in world space.
 /// </summary>
 /// <param name="deltaLocation">Change in location in world space for the component.</param>
 /// <param name="sweep">Whether we sweep to the destination location, triggering overlaps along the way and stopping short of the target if blocked by something.
 /// Only the root component is swept and checked for blocking collision, child components move without sweeping. If collision is off, this has no effect.</param>
 /// <param name="teleport">Whether we teleport the physics state (if physics collision is enabled for this object).
 /// If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location).
 /// If false, physics velocity is updated based on the change in position (affecting ragdoll parts).
 /// If CCD is on and not teleporting, this will affect objects along the entire sweep volume.</param>
 public void AddWorldOffset(FVector deltaLocation, bool sweep = false, ETeleportType teleport = ETeleportType.None)
 {
     Native_USceneComponent.AddWorldOffset(this.Address, ref deltaLocation, sweep, (int)teleport);
 }
Esempio n. 10
0
 /// <summary>
 /// Put this component at the specified rotation in world space. Updates relative rotation to achieve the final world rotation.
 /// </summary>
 /// <param name="newRotation">New rotation in world space for the component.</param>
 /// <param name="sweep">Whether we sweep to the destination (currently not supported for rotation).</param>
 /// <param name="teleport">Whether we teleport the physics state (if physics collision is enabled for this object).
 /// If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location).
 /// If false, physics velocity is updated based on the change in position (affecting ragdoll parts).
 /// If CCD is on and not teleporting, this will affect objects along the entire sweep volume.</param>
 public void SetWorldRotation(FRotator newRotation, bool sweep = false, ETeleportType teleport = ETeleportType.None)
 {
     Native_USceneComponent.SetWorldRotation(this.Address, ref newRotation, sweep, (int)teleport);
 }
Esempio n. 11
0
 /// <summary>
 /// Adds a delta to the rotation of the component in its local reference frame
 /// </summary>
 /// <param name="deltaRotation">Change in rotation of the component in its local reference frame.</param>
 /// <param name="sweep">Whether we sweep to the destination (currently not supported for rotation).</param>
 /// <param name="teleport">Whether we teleport the physics state (if physics collision is enabled for this object).
 /// If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location).
 /// If false, physics velocity is updated based on the change in position (affecting ragdoll parts).</param>
 public void AddLocalRotation(FRotator deltaRotation, bool sweep = false, ETeleportType teleport = ETeleportType.None)
 {
     Native_USceneComponent.AddLocalRotation(this.Address, ref deltaRotation, sweep, (int)teleport);
 }
Esempio n. 12
0
 /// <summary>
 /// Set the transform of the component relative to its parent
 /// </summary>
 /// <param name="newTransform">New transform of the component relative to its parent.</param>
 /// <param name="sweep">Whether we sweep to the destination (currently not supported for rotation).</param>
 /// <param name="teleport">Whether we teleport the physics state (if physics collision is enabled for this object).
 /// If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location).
 /// If false, physics velocity is updated based on the change in position (affecting ragdoll parts).</param>
 public void SetRelativeTransform(FTransform newTransform, bool sweep = false, ETeleportType teleport = ETeleportType.None)
 {
     Native_USceneComponent.SetRelativeTransform(this.Address, ref newTransform, sweep, (int)teleport);
 }