Results 1 to 6 of 6
  1. #1
    MSgt. Shooter Person
    Join Date
    May 2011
    Posts
    72

    Default How to parent location but not rotation?

    I am trying to parent an actor to my pawn (I do so successfully with SetBase) but have it only follow the location and not rotation. I have been using this hacky way to do it...
    Code:
    //This code is inside the child (the actor attached via SetBase) not the pawn.
    event Tick(float DeltaTime)
    {
    	SetRotation(Rot(0,0,0));
    	//Rotation Handling code here.
    }
    Anything native? (I've looked found nothing) Or a better solution?
    Last edited by Saucy; 05-16-2012 at 02:31 PM.
    The comment above is approved by the "this comment is golden" society. ☜(゚ヮ゚☜)

  2. #2
    MSgt. Shooter Person
    Join Date
    May 2011
    Posts
    72

    Default

    Anyone? Some advice maybe?
    The comment above is approved by the "this comment is golden" society. ☜(゚ヮ゚☜)

  3. #3
    Banned
    Join Date
    Feb 2011
    Location
    BXL/Paris
    Posts
    2,169

    Default

    Basically, SetBase take care of rotation too, but your call SetRotation(Rot(0,0,0)); in Tick will reset any attempt...

  4. #4
    MSgt. Shooter Person
    Join Date
    May 2011
    Posts
    72

    Default

    So you basically said what I am doing is the only way...? Why write so dodgy?
    I guess I'll just leave my code the way it is then.
    The comment above is approved by the "this comment is golden" society. ☜(゚ヮ゚☜)

  5. #5
    Banned
    Join Date
    Feb 2011
    Location
    BXL/Paris
    Posts
    2,169

    Default

    No... You should use this:
    Code:
    /** If TRUE, this actor ignores the effects of changes in its  base's rotation on its location and rotation. */
    var(Attachment) bool bIgnoreBaseRotation;
    ...if you don't want to update to BaseRotation.
    Last edited by VendorX; 05-18-2012 at 03:17 AM.

  6. #6
    MSgt. Shooter Person
    Join Date
    May 2011
    Posts
    72

    Default

    Thank you! That's what I've been looking for!
    The comment above is approved by the "this comment is golden" society. ☜(゚ヮ゚☜)


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.