Results 1 to 7 of 7
  1. #1
    Skaarj
    Join Date
    Aug 2003
    Posts
    12

    Default Touch and Volumes

    I'm been having trouble getting the Touch() event to fire for my pawn when collision occurs with my class derived from Volume. Currently i'm using these defaults on the Volume:

    Code:
    defaultproperties
    {
    	bBlockNonZeroExtentTraces=false
    	bBlockZeroExtentTraces=false
    	bWorldGeometry=true
    	bCollideActors=true
    	bBlockActors=false
    	bBlockPlayers=false
    	bBlockKarma=false
    }
    My pawn derives from UnrealPawn and collides with the world and other actors correctly. And when i hit my triggers i get the expected Touch() event, but i never get one with the Volume.

    Is there something i could be doing incorrectly in UnrealED? Maybe in how i'm creating the brush to be used with the volume?

  2. #2

    Default

    Volumes are bStatic by default. bStatic objects are not ticked, so you won't get any native events (like Touch) on them.

  3. #3
    Skaarj
    Join Date
    Aug 2003
    Posts
    12

    Default

    Originally posted by Mysterial
    Volumes are bStatic by default. bStatic objects are not ticked, so you won't get any native events (like Touch) on them.
    But what about on my Pawn? Wouldn't Touch() be called on the Pawn even if it collides with an actor which is bStatic?

  4. #4

    Default

    Oh, on the pawn. I'm not sure. Have you tried setting bBlockZeroExtentTraces and bBlockNonZeroExtentTraces to true? If that doesn't work, then the answer is no

  5. #5
    Skaarj
    Join Date
    Aug 2003
    Posts
    12

    Default

    Originally posted by Mysterial
    Oh, on the pawn. I'm not sure. Have you tried setting bBlockZeroExtentTraces and bBlockNonZeroExtentTraces to true? If that doesn't work, then the answer is no
    Yep done that... true and false both. Nothing seems to work like if the native side of the implementation isn't allowing the touch to occur. I've even added a foreach TouchingActors() loop in Pawn.PlayerTick() , but even that fails to report me touching the derived Volume class.

    I may have to just find another way.

  6. #6
    legacy-[KotS]VoiD
    Guest

    Default Try this...

    Try using the AssociatedActorTag on the volume actor and the Tag event on another derived actor.

    Add this class to your code:

    Code:
    class VolumeHandleActor extends Actor placeable;
    
    event Touch(Actor Other)
    {
    	Log("VolumeHandleActor::Touched");
    
    	Super.Touch(Other);
    }
    
    event Untouch(Actor Other)
    {
    	Log("VolumeHandleActor::Untouched");
    
    	Super.Untouch(Other);
    }
    
    defaultproperties
    {
    }
    Then add a volume to your map with the AssociatedActorTag property set to something like "VolumeHandler001"

    Finally add a VolumeHandleActor with a Tag property of "VolumeHandler001"

    Note AssociatedActorTag can be found under the Volume section and Tag can be found under the Events section

    When the volume's PostBeginPlay is called it will try to find an Actor in the map that has a Tag property that matches the volume's AssociatedActorTag. In this case it will find the VolumeHandleActor. Then it will call the Touch & Untouch events on that VolumeHandleActor when another actor (such as a pawn) touches the volume.

    Hope that makes sense..

    -VoiD

  7. #7
    Skaarj
    Join Date
    Aug 2003
    Posts
    12

    Default

    Well thanks for the help guys, but finally it started working. I just changed my pawn base class from UnrealPawn to xPawn. I guess something in xPawn turned on Touch. One day i'll figure that one out.


 

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.