Announcement

Collapse
No announcement yet.

Boundin box Align with pawn axis

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Boundin box Align with pawn axis

    Hi

    Is there any way to align the bounding box axis with the pawn axis, or an actor axis? the reason is that im doing a space game and my pawn and others actor are not align with the bounding box so when my pawn is walking it seems to be floating.

    the collision component of my pawn is a cilinder mesh that i made.

    Maybe i have to do other thing not related to the bounding box, any ideas?




    Thank you

    #2
    PHYSICS_Spider

    Comment


      #3
      thank you for the response i will study this option.
      I think also that the key is to know that is possible in UDK to do a OOBB (Object Orientated Bounding Box) instead of AABB (Axis Aligned Bounding Box), anyone knows that is possible?

      Comment


        #4
        i can tell you physsics spider can allow your pawn to align with the surface, wich that would allow you to do a lot of stuff , " i guess " .

        I seen that people has a problem when the Wall is 90 degrees, i wonder if there's a way around to resolve that .

        Comment


          #5
          Bounds are AABB. Sweep tests for movement (non-zero extent traces) use an AABB. Cylinder components are always axis-aligned.

          Only PHYS_RigidBody actors simulated through PhysX, i.e KActors, have proper oriented collision.

          Comment


            #6
            So Could I set a oriented collision to a pawn? or a interpActor?

            Comment


              #7
              The issue is the cylinder component, it can never be rotated. As Spoof mentioned, it is axis aligned, so that it's local Z is always pointing up the world Z.

              Repalce the cylinder component with a static mesh component for collision. You can rotate that freely, but it is much less efficient.

              Comment


                #8
                I replaced the cylinder component with a static mesh, (is the cilynder mesh in the picture) maybe i couldnt remove well the cylinder component and is still using?
                I used Components.Remove(CollisionCylinder), that works?

                Here is the default properties in the mypawn code

                Code:
                    Begin Object class=SkeletalMeshComponent Name=SandboxPawnSkeletalMesh
                        AlwaysLoadOnClient = true;
                		AlwaysLoadOnServer = true;
                		bOwnerNoSee = false;
                		CastShadow = true;
                		SkeletalMesh=SkeletalMesh'CH_IronGuard_Male.Mesh.SK_CH_IronGuard_MaleA'
                                Scale3D=(X=3,Y=3,Z=3) 		
                                AnimSets(0)=AnimSet'CH_AnimHuman.Anims.K_AnimHuman_BaseMale'
                                AnimTreeTemplate=AnimTree'CH_AnimHuman_Tree.AT_CH_Human'
                		HiddenGame=FALSE
                                HiddenEditor=FALSE
                                LightEnvironment=MyLightEnvironment
                    End Object
                    Mesh=SandboxPawnSkeletalMesh
                    Components.Add(SandboxPawnSkeletalMesh)
                   
                    Begin Object Name=CollisionCylinder
                        CollisionHeight= 64
                        CollisionHeight= 140
                        BlockZeroExtent = False
                    End Object
                    Components.Add(CollisionCylinder)
                    CylinderComponent=CollisionCylinder
                
                    Begin Object class=StaticMeshComponent Name=StaticMeshComponent0
                	StaticMesh=StaticMesh'cylinder'
                	Translation=(X=0.000000,Y=0.000000,Z=-12)
                	Scale3D=(X=2.5401,Y=2.634,Z=7.16)
                	HiddenGame=true
                	HiddenEditor=true
                	CollideActors=True
                	BlockActors=True
                	BlockZeroExtent=True
                	BlockNonZeroExtent= True
                	BlockRigidBody=True
                	bDisableAllRigidBody=false	
                    End Object
                    CollisionComponent=StaticMeshComponent0
                    Components.Add(StaticMeshComponent0)
                
                    Components.Remove(CollisionCylinder)

                Comment


                  #9
                  I believe in UE3 you can remove the Collision Cylinder. Components.Remove(Component) will do the trick.

                  Comment


                    #10
                    The code line Components.Remove(CollisionCylinder) removed the collisionCylinder.
                    My pawn has the static mesh component for collision and it works, but the bounding box is still aligned with z axis.
                    Im afraid of we can find a solution for this issue, any help will be appreciated. Thank you.

                    Comment


                      #11
                      You can remove the cylinder from Pawn, but its possible to crash UDK due to some native code assumptions related to jumping.

                      The problem is that all Unreal based movement collision is axis-aligned. Movement employs NonZeroExtent traces, which sweep an axis-aligned bounding box in the direction the pawn moves.

                      Comment

                      Working...
                      X