Results 1 to 3 of 3
  1. #1
    MSgt. Shooter Person
    Join Date
    Jun 2011
    Posts
    133

    Default Changing Scale of collisionComponent of InterpActor does not work

    hi,
    I made a custom interpActor generated and ejected when my pawn shots (like a fireball or bullet). It collides with other pawns and makes damage. If there is no scale change for that interpActor, everything goes well.

    Now my problem is that my fireball should expand its size per frame with a factor. I found that I can only resize its drawing scale(representation), but the collision size stays.
    I've tried following functions in Tick:
    Code:
    MyInterpActor.StaticMeshComponent.SetScale3D(OrigScale+Factor*DeltaTime);
    or MyInterpActor.CollisionComponent.SetScale3D(OrigScale+Factor*DeltaTime);
    or MyInterpActor.SetCollisionSize((OrigScale+Factor*DeltaTime).X,(OrigScale+Factor*DeltaTime).Z);
    or MyInterpActor.SetDrawScale(OrigScale+Factor*DeltaTime);
    I also tried to redeclaire MyInterpActor.SetCollision(true) after above steps.
    In log, I can see the scale of its staticMeshComponent/CollisionComponent is changed, but with command "nxvis collision" or with the real collision test, we can see the collision size stays.

  2. #2
    MSgt. Shooter Person
    Join Date
    Jun 2011
    Posts
    133

    Default

    OK, solved.
    I found that the collision size is in fact changed and works well. The only problem is that the command "nxvis collision" shows incorrectly(stay unchanged) after collision re-scaled.
    IT'S A BUG!

    Quote Originally Posted by dprat0821 View Post
    hi,
    I made a custom interpActor generated and ejected when my pawn shots (like a fireball or bullet). It collides with other pawns and makes damage. If there is no scale change for that interpActor, everything goes well.

    Now my problem is that my fireball should expand its size per frame with a factor. I found that I can only resize its drawing scale(representation), but the collision size stays.
    I've tried following functions in Tick:
    Code:
    MyInterpActor.StaticMeshComponent.SetScale3D(OrigScale+Factor*DeltaTime);
    or MyInterpActor.CollisionComponent.SetScale3D(OrigScale+Factor*DeltaTime);
    or MyInterpActor.SetCollisionSize((OrigScale+Factor*DeltaTime).X,(OrigScale+Factor*DeltaTime).Z);
    or MyInterpActor.SetDrawScale(OrigScale+Factor*DeltaTime);
    I also tried to redeclaire MyInterpActor.SetCollision(true) after above steps.
    In log, I can see the scale of its staticMeshComponent/CollisionComponent is changed, but with command "nxvis collision" or with the real collision test, we can see the collision size stays.

  3. #3
    Boomshot
    Join Date
    Aug 2011
    Posts
    2,280

    Default

    nxvis shows the PhysX body instance, which is separate from unreal physics. You may find that when your interpactor collides with rigid bodies they will only be affected by the unchanged nxvis collision.


 

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.