Results 1 to 28 of 28
  1. #1
    Iron Guard
    Join Date
    Sep 2008
    Location
    Utah or California
    Posts
    566
    Gamer IDs

    Gamertag: Marscaleb PSN ID: Marscaleb

    Default Attacking with the collision hull?

    Trying to have my player pawn wield a sword. Traditional weapon attacks are NOT working.

    Instant hit effects don't travel through more than one enemy, so if you've got a bunch of foes in your personal space it only attacks the first one it hits. Furthermore it only works in a direct line from a designated point; it is not very useful for the sweeping range that one should have with a sword.
    Projectiles don't quite work either; I'd need one super fancy projectile to match the curve of my sweep, and even then it only works if the player stands perfectly still and doesn't get interrupted by anything.

    I've snooped around and found tutorials that perform traces between two bones in a mesh, thus a system that can detect when something passes through the sword. But this is insufficient because it sets the bounds too small for this project.
    I'm not making Way of the Sword here, nor some complex combo-driven system; the sword attack will just be a one-button deal with just one swipe. As such, I need the attack range to be a little generous to compensate for aiming that the player cannot perform. A thin line of detection isn't enough, and honestly a static collision hull affixed to the mesh is only slightly better.

    I think what I may really need to do is generate an animated 3D shell that will be invisible in the actual game. It needs to be animated so that it can start off small, fill the range of the sweep, and cut its range to where the sword is at any given moment (plus buffer.) It would need to be tied in with the player pawn so if the player is moving the sweep doesn't remain standing where the player was.

    So that would be:
    -Mesh that inflicts damage upon contact, being able to contact multiple objects but each object is contacted only once per animation.
    -When not in use mesh either becomes inert or completely disappears
    -Mesh moves with player pawn
    -Mesh can be forced to vanish in the middle of its animation (if attack gets interrupted because player got hit from behind, etc)
    -A different animation (or possibly a different mesh) can be called. (Crouching and jumping may need slightly different attacks, and a longer sword will become available later.)

    This seems like a tall order, and I don't really know where to begin. I don't even know if I am going about this the right way.
    Any thoughts here? Is there a better way to accomplish this end goal, and if not, how do I create this stuff?

    And I also suspect that it would be easier to animate the mesh using vertex animation so I can fine-tune the exact shape of the hull. But if I did that how do I handle proper attaching? Everything in UE3 is centered around bones for attachment.
    Last edited by marscaleb; 02-14-2012 at 09:44 PM.
    Follow my progress at:
    http://marscaleb.com/
    Read my new webcomic: Mischief in Maytia
    http://maytiacomic.com/

  2. #2
    MSgt. Shooter Person
    Join Date
    Sep 2011
    Location
    United_Kingdom
    Posts
    122

    Default

    Have a look at Chivalry medieval warfarehttp://www.indiedb.com/games/chivalr...-hit-detection kind of explains the concept, watch the video on hit detection.

  3. #3
    Iron Guard
    Join Date
    Sep 2008
    Location
    Utah or California
    Posts
    566
    Gamer IDs

    Gamertag: Marscaleb PSN ID: Marscaleb

    Default

    That is a cool system, but is also explicitly different from what I mentioned.

    I said that I am NOT making a complex combo-driven system; the melee combat in my game will only be one simple swipe so I will need a system that extends its collision BEYOND what the animation itself passes through.
    If my melee stroke is mostly horizontal, then if I attack an enemy on a slope it could completely miss because of the terrain. If my melee stroke is mostly vertical, then the player could miss if they are slightly to the side of an enemy. Diagonal strikes reduce these possibilities, but can still suffer from BOTH occurrences. Thus a system where the attack is directly tied in with the actual animation is only suitable for games with sufficiently diverse attacking animations or otherwise with an ability for the player to finely control the attack. This is NOT what the melee attacks in my game will be like.
    This is perhaps the most important thing I mention here. The actual range of my melee attack should NOT be limited by my animation.

    Let's start with something simpler. How could I generate a collision hull, let's just say a box, that will appear before the player where I want it?
    Here, some visual aid.


    Now let's ignore the corners that come no where near the swing for a moment, for simplicity's sake. In fact if we want to image that as a simple six-sided box by all means do so. And for the moment let's ignore the fact that I would want this collision hull to animate. Let's get really simple and imagine a large box appearing that damages the enemies. That's the first step. How would I do that?
    Follow my progress at:
    http://marscaleb.com/
    Read my new webcomic: Mischief in Maytia
    http://maytiacomic.com/

  4. #4
    Iron Guard
    Join Date
    Sep 2008
    Location
    Utah or California
    Posts
    566
    Gamer IDs

    Gamertag: Marscaleb PSN ID: Marscaleb

    Default

    Shouldn't it be possible to use part of the collision model or a separate collision model for attacks and things? I mean, how else would you create something like a fighting game? You'd need your player's fists to deal damage but not the player's other parts. You couldn't just use a simple line trace like with those sword examples because you have a large arm that needs to be accounted for.
    How would one handle attacking with player's fists? Honestly this isn't that much different.
    Follow my progress at:
    http://marscaleb.com/
    Read my new webcomic: Mischief in Maytia
    http://maytiacomic.com/

  5. #5
    Iron Guard
    Join Date
    Sep 2008
    Location
    Utah or California
    Posts
    566
    Gamer IDs

    Gamertag: Marscaleb PSN ID: Marscaleb

    Default

    I've been doing some research on components and attaching actors.
    I think what I might want to do is add a second collision component to my pawn, and set that collision component to not block/collide with anything. (I am not sure if I can have a second collision component that works like this, in which case I would simply create a second actor and attach it to pawn.) However, at the correct moment during an attack, I could have that collision declare damage to anything touching it. This, I think, would be easier to work with than creating and removing a new component or actor, as those processes take up a fair amount of processing.

    But I am having difficulty finding out how to do this. I'm reading the collision technical guide and I see references to several functions but I am uncertain how they need to be used, or if they would properly suit my needs. I see TouchingActors and OverlappingActors, but I am not sure of the difference. And it states that these are iterator functions. I have no idea how I have to use that type of function.
    Am I re-writing this function? Am I calling this function and apply my function to the results?
    Am I even going about this the right way to have a collision inflict damage upon those it touches?
    Follow my progress at:
    http://marscaleb.com/
    Read my new webcomic: Mischief in Maytia
    http://maytiacomic.com/

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

    Default

    Hey man,
    you've been troubled by exactly the same demand of mine, and on the way exactly the same I'm on, at exactly the same time - Maybe I'm 48 hours ahead of you.:-)
    Here are the thread and thread talking about this. May those helps us for discussion.
    My system contains combo attacks but that's not the hit point. We need to find something like a dynamic collision volume to alarm us if some pawn hits them, while we can control the trace of this volume at every detail as the animation plays.
    The official documents hints privitiveComponent can handle that(or maybe they forgot to update those pages), but I still cannot find any possibility. If I cannot get any advance this week, I will turn to use "traceActor" instead, which will surly cost more system time and reduce performance. :-(
    Let's discuss on this topic and hope we can get more useful suggestions on community.



    Quote Originally Posted by marscaleb View Post
    I've been doing some research on components and attaching actors.
    I think what I might want to do is add a second collision component to my pawn, and set that collision component to not block/collide with anything. (I am not sure if I can have a second collision component that works like this, in which case I would simply create a second actor and attach it to pawn.) However, at the correct moment during an attack, I could have that collision declare damage to anything touching it. This, I think, would be easier to work with than creating and removing a new component or actor, as those processes take up a fair amount of processing.

    But I am having difficulty finding out how to do this. I'm reading the collision technical guide and I see references to several functions but I am uncertain how they need to be used, or if they would properly suit my needs. I see TouchingActors and OverlappingActors, but I am not sure of the difference. And it states that these are iterator functions. I have no idea how I have to use that type of function.
    Am I re-writing this function? Am I calling this function and apply my function to the results?
    Am I even going about this the right way to have a collision inflict damage upon those it touches?

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

    Default

    Btw, attach actors will not work. Soft attachment of your weapon will not rotate with your pawn's arm, while hard attachment cannot accept collision event as this page said.

  8. #8
    Iron Guard
    Join Date
    Sep 2008
    Location
    Utah or California
    Posts
    566
    Gamer IDs

    Gamertag: Marscaleb PSN ID: Marscaleb

    Default

    Quote Originally Posted by dprat0821 View Post
    Btw, attach actors will not work. Soft attachment of your weapon will not rotate with your pawn's arm, while hard attachment cannot accept collision event as this page said.
    I don't think I need to allow my attached actor to block actors; I only needs its collision for checking damage when called.

    Okay, so I've made a minor bit of progress, although I am not sure because I don't have everything else to test it with.
    I think I know how to cause damage to actors who touch my collision hull.
    Code:
    local Actor Hitactor;
    foreach touchingActors(class 'actor', HitActor)
    {
       HitActor.TakeDamage(DamageAmount, Instigator.Controller, HitLoc, Momentum, class'DamageType');
    }
    ...right? I'm really not sure about that, and not certain what everything I put in there means.

    This still leaves understanding how to attach this second collision hull to my pawn, and how to call that foreach and takeDamage only when the player attacks, and to not attack the same actor multiple times during the period of time that the attack is active.
    Follow my progress at:
    http://marscaleb.com/
    Read my new webcomic: Mischief in Maytia
    http://maytiacomic.com/

  9. #9
    MSgt. Shooter Person
    Join Date
    Nov 2011
    Posts
    108

    Default

    well the way you could trigger it would be in the onFire(), and when using that weapon (if there is to be more then one weapon). then a foreach will only iterate through the given list once per call. I don't actually see the cause for alarm.

  10. #10
    Iron Guard
    Join Date
    Sep 2008
    Location
    Utah or California
    Posts
    566
    Gamer IDs

    Gamertag: Marscaleb PSN ID: Marscaleb

    Default

    Well if it just runs its foreach just once, then that is effectively just one tick and one tick only wherein the player can inflict damage. For something that is effectively emulating a sword swinging I would assume that the attack should be viable for a few frames. It would be a very quick duration to be sure, but not just some one instant; not just one tick.
    Follow my progress at:
    http://marscaleb.com/
    Read my new webcomic: Mischief in Maytia
    http://maytiacomic.com/

  11. #11
    MSgt. Shooter Person
    Join Date
    Nov 2011
    Posts
    108

    Default

    so your problem is animation duration, and causing damage to the "effected" object when the animation reaches that point. if that's the case then I see two options one involves some trig the other involves some lies, and if you pick the trig answer oh my gosh the fun with trig you will have.
    the first option is to have a delay timer start once the player presses the fireButton for your weapon, and then not allow that weapon, or any other to be fired until the animation finishes (the timer can be equal to the animation length), and your whole thing of damage will be dealt to all of the pawns on the arch in a single tick, and your problem with this is that its not realistically. your options are effective, and a little suspension of disbelief. where any player that is being effected by this probably won't even notice the damage until after they see the animation, and in most cases won't be able to realize that the damage happened a few microseconds before the animation passed their character a tick is a generic time interval that is used to update data about the object it is not a fixed length of time. and the animation that your talking about is probably going to be a second or maybe 3 anyways so yah. if you absolutely want to go realistic to the core then read the next suggestion.
    effectively what you are talking about is per frame of animation calculating the pawn that is in the path of the sword at the specific frame. if this is wrong then what follows will be extraneous:
    you would need to do trig at every step along the swing of the sword doing traces each frame assuming constant distance you would have to determine the increments along the swing that your function would be called, or a rough deduction there of. then have the trace start be the pawn's location, and the trace end be the point
    (length*cos(interval*step), length*sin(interval*step), self.location.z))
    yah this looks like fun but it will give you your realisum, and those ticks will just get really long.

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

    Default

    I don't get it... All this stuff... Why not simply add custom collision to your weapon and use Touch from that collision to execute TakeDamage..?
    Last edited by VendorX; 02-25-2012 at 10:24 AM.

  13. #13
    Boomshot
    Join Date
    Aug 2011
    Posts
    2,920

    Default

    Quote Originally Posted by marscaleb View Post
    That is a cool system, but is also explicitly different from what I mentioned.
    While different, it is still a more elegant solution to the actual problem and very adaptable to simple volumes such as fists, or even complex shapes. To be honest I would consider a fist as a single point requiring only one set of traces.

    I've only glanced through this thread, but I get the impression that you envisage the 'hull' method as the simpler solution. To me it seems the opposite.

  14. #14
    Iron Guard
    Join Date
    Sep 2008
    Location
    Utah or California
    Posts
    566
    Gamer IDs

    Gamertag: Marscaleb PSN ID: Marscaleb

    Default

    I just had a thought this morning about a better way to handle the issue of an actor potentially touching the attack-collision for multiple ticks during the animation.
    I could set up all my pawns to have a brief invulnerability state after taking damage, so if they are noted as being hit in the next tick the damage is just ignored. Ideally this would be accompanied with a flinching animation or at least a stutter. This flinching period would last, oh, about as long as the attack, just 1/15 of a second or so, and could be customized for different pawns. (I would already have to create such an effect for use with the player's pawn; rooting the functionality in all of my game's pawn makes more sense.)

    If would be nice if I could find a way to keep the pawn identified as having been hit so it can just be ignored in each successive tick, but I suppose that even if I had such a method I would only be saving two maybe three cycles.

    Quote Originally Posted by VendorX View Post
    I don't get it... All this stuff... Why not simply add custom collision to your weapon and use Touch from that collision to execute TakeDamage..?
    Well, I am also unsure how to do that, and half of what I am going after is borne from trying to simplify my thoughts for how to achieve a proper melee attack.
    But the reason why I haven't been pursuing a conventional melee method is because I want to have a "buffer zone" in my attack. In my game, the melee attack would be a simple single attack, no combos, no custom motions, not even pitching the player. Methods that trace exactly where the player's sword is run into problems in situations like fighting on slopes or enemies being just to the side of the player. Since the player cannot compensate his attack for these situations I need the effected range of his attack to compensate for itself.

    Quote Originally Posted by Spoof View Post
    I've only glanced through this thread, but I get the impression that you envisage the 'hull' method as the simpler solution. To me it seems the opposite.
    That's probably a very accurate statement. For the record here, I asked about my idea, nobody responded, so I tried breaking it down into smaller steps.

    ...But I just had an idea.
    What if the way I handled this was to... sort of create an invisible limb that does the attacking. Basically, just have one extra bone in my skeleton that has no geometry attached to it, but is animated. In the attacking animation the extra bone just moves, I'd say, in an exact straight horizontal line. Next I attach to this bone the actual melee weapon, which also has no visible model, but it has a collision box that extends to the height and width I want it to effect.
    That way the actual collision that handles the attacking can move through its motion without being effected by the actual location and rotation of the weapon we see being used. So if the animation is a diagonal sweep, whether the sword is up high or down low, the attack still effects the full height that should be effected.

    ...I think that would work, and be simple to execute.

    Checking a collision for touching actors is just as complex as tracing actors between two points. Having the attack be active for more than one tick would simply involve triggering a state instead of a function. (The state could even deactivate itself.)
    So I just need to attach an actor with my correct box collision to a specified bone, establish a reference between its class and my pawn's class, (or controller class,) and give it a state that checks for touching actors every tick for a specified time. Oh and make the pawns flinch as I described earlier.

    That would cover everything, and be reasonably easy to create, don't you think?
    Follow my progress at:
    http://marscaleb.com/
    Read my new webcomic: Mischief in Maytia
    http://maytiacomic.com/

  15. #15
    Boomshot
    Join Date
    Aug 2011
    Posts
    2,920

    Default

    Quote Originally Posted by marscaleb View Post
    In my game, the melee attack would be a simple single attack, no combos, no custom motions, not even pitching the player. Methods that trace exactly where the player's sword is run into problems in situations like fighting on slopes or enemies being just to the side of the player. Since the player cannot compensate his attack for these situations I need the effected range of his attack to compensate for itself.
    In that case why bother with collision at all?

    Just iterate over all actors in a small radius around the player, determine which one is within melee range and roughly infront of the pawn and... whallop!. No tracing, no collision response, no fudging actor state, and probably 5 lines of code.

  16. #16
    Iron Guard
    Join Date
    Sep 2008
    Location
    Utah or California
    Posts
    566
    Gamer IDs

    Gamertag: Marscaleb PSN ID: Marscaleb

    Default

    Quote Originally Posted by Spoof View Post
    determine which one is within melee range and roughly infront of the pawn and...
    How do I determine "roughly in front of pawn?"

    (Also that would only work if the sword swing was fast enough that it only took a single frame, as anything slower would cause enemies to get hit before the sword touches them. Still though I want to know, how do I determine "roughly in front of player?" There are other situations where that knowledge would be very useful.)
    Follow my progress at:
    http://marscaleb.com/
    Read my new webcomic: Mischief in Maytia
    http://maytiacomic.com/

  17. #17
    Technical Writer - UDN
    Join Date
    Aug 2006
    Posts
    3,928
    Gamer IDs

    Gamertag: ffejnosliw

    Default

    Quote Originally Posted by marscaleb View Post
    How do I determine "roughly in front of pawn?"
    Dot product

  18. #18
    Iron Guard
    Join Date
    Sep 2008
    Location
    Utah or California
    Posts
    566
    Gamer IDs

    Gamertag: Marscaleb PSN ID: Marscaleb

    Default

    Quote Originally Posted by ffejnosliw View Post
    Dot product
    Quote Originally Posted by UDN
    Binary. Performs the dot product operation on the two input Vector values and outputs a Float value representing the scalar projection of the left input onto the right input. The result (assuming the two inputs are both unit vectors, e.g. each have a length of 1) can be anywhere from -1.0 to 1.0, with -1.0 representing the vectors pointing in perfectly opposite directions, 0.0 representing perpendicular vectors, and 1.0 representing parallel vectors pointing in the same direction.
    ...wouldn't that only result in a positive result if the two pawns were facing the same direction? What properties would I need to apply this operation to in order to determine if an effected pawn is in front of my attacking pawn? I would need some way to get a vector from the player to the hitActor and perform the operation between that and the player's vector.
    Follow my progress at:
    http://marscaleb.com/
    Read my new webcomic: Mischief in Maytia
    http://maytiacomic.com/

  19. #19
    Boomshot
    Join Date
    Aug 2011
    Posts
    2,920

    Default

    You compare the vector of the Pawn's view direction, with a vector representing a line between pawn and target. The result is the cosine of the angle between them. Roughly infront is a value close to +1 (or -1 depending of on the order of arguments).

    Code:
    // psuedocode...
    
    local float d;
    
    d = Normal(pawn.Location - targetActor.Location) dot Vector(pawn.Rotation);
    
    if( d > 0.85 )
    {
        // close enough...
    }

  20. #20
    Iron Guard
    Join Date
    Sep 2008
    Location
    Utah or California
    Posts
    566
    Gamer IDs

    Gamertag: Marscaleb PSN ID: Marscaleb

    Default

    Code:
    var float AttackRange;
    var int MeleeAttackDamage;
    
    exec function MeleeAttack ()
    {
     local actor HitActor;
     local float DotRange;
    
     foreach OverlappingActors(class 'actor', HitActor, AttackRange)
     {
      DotRange = Normal(HitActor.Location - Location) dot Vector(Rotation);
      if (DotRange > 0.5)
      {
       HitActor.TakeDamage(MeleeAttackDamage, Instigator.Controller, HitLoc, Momentum, class'DamageType');
      }
     }
    }
    Well there's a fine and dandy temporary function to use while I set up this extra invisi-bone in my custom player model.
    Thank you for the assistance!
    Follow my progress at:
    http://marscaleb.com/
    Read my new webcomic: Mischief in Maytia
    http://maytiacomic.com/

  21. #21
    Iron Guard
    Join Date
    Sep 2008
    Location
    Utah or California
    Posts
    566
    Gamer IDs

    Gamertag: Marscaleb PSN ID: Marscaleb

    Default

    Okay, while building my more long-term solution to the attacking, I have run into a small hiccup.

    So I have an actor attached to my pawn that will do the business of actually inflicting damage.
    This actor is spawned by the pawn and so my pawn easily has a reference to the actor.
    I was about to simply have the pawn call a function in the "sword" that would inflict damage, but I realize the instigator needs to point to the pawn's controller. Yet I have no reference to the player controller from within the "sword."
    I would need either a way for the sword to get back to the player, or I would need the pawn to execute a function in the sword that returns all the actors the sword is touching so the pawn execute the damage code.
    Or I need a way to nullify the instigator check; I don't think I need it in my game. But you never know how things might change, so I would first like to hear if anyone knows how to get the sword to reference the pawn's controller.
    Follow my progress at:
    http://marscaleb.com/
    Read my new webcomic: Mischief in Maytia
    http://maytiacomic.com/

  22. #22
    Redeemer
    Join Date
    Dec 2008
    Location
    Germany
    Posts
    1,559

    Default

    Every Actor has an Owner. You can directly set the owner with the spawn function.

    The Owner is an Actor so you would need to cast until you get the Controller.


    Why don't you let your sword do the damage itself? For example by simply calling TakeDamage() on each touching actor.
    Youtube - UnrealEverything

    2B || !(2B)

  23. #23
    Iron Guard
    Join Date
    Sep 2008
    Location
    Utah or California
    Posts
    566
    Gamer IDs

    Gamertag: Marscaleb PSN ID: Marscaleb

    Default

    (Why do I get replies to threads but the thread returns as being read? I keep missing helpful advice people give me.)

    I do want the sword to call the TakeDamage function, as that should be easier, but I'm getting held up with the instigator. I need to pass to the function the controller of the pawn.

    While reviewing the problem today I thought of a solution that (at the very least) compiles correctly.

    Code:
    (In the pan's code, after spawning the sword)
        Sword.SetSwordController(controller);
    
    (In the sword's code)
    function setSwordController(actor SentActor)
    {
     Controller = SentActor;
    }
    I had to change the sword reference in the pawn from being an actor to being the exact name of my sword's class, but it compiled.
    I can't really test to see if indeed it is actually referencing the correct actor since my game doesn't use the instigator data anywhere, but it's going to be along while before that data is relevant.

    Now I'm getting problems with my sword touching actors.
    I put a bunch of logs all over the code and I found that everything is working except the sword is not noticing that it is indeed touching actors. The most probable cause is that the sword doesn't have a proper collision.

    Just to be clear here, right now (because you gotta build these things one piece at a time) I just have a "sword" actor that is attached to the pawn and just floats in front on him. That actor is a static mesh with a collision box that covers a wide area. The collision is just a cube I made from the builder brush and it is properly saved to the static mesh.
    However in the actor class I assign it that static mesh as its static mesh component, but I do not assign it any primitive or collision components. I was hoping it would simply inherit that from the static mesh actor, (just the same as how I don't need to assign a material for my static mesh actor.)
    Seeing as how it won't "touch" any actors and no collision appears on it when I use "show collision" I was wrong.

    But how do I give that actor the collision assigned to the static mesh? The primitive components I see described in the documentation are cylinders and spheres, NOT a box shape like I want, let alone the box that I already assigned to the static mesh.
    So how do I assign my class to use the collision already given to the static mesh?
    Follow my progress at:
    http://marscaleb.com/
    Read my new webcomic: Mischief in Maytia
    http://maytiacomic.com/

  24. #24
    Iron Guard
    Join Date
    Sep 2008
    Location
    Utah or California
    Posts
    566
    Gamer IDs

    Gamertag: Marscaleb PSN ID: Marscaleb

    Default

    Okay, I can't get the collision for this sword to work at all.
    I directly added a cylinder component to use for collision. When I run it and say to show collision, I see no collision component on the sword attached to my pawn. I see the sword, but it has no collision, and thus cannot "touch" any actors.

    Why can't I get any collision to work for this attached actor?

    Code:
    	Begin Object Class=CylinderComponent Name=CollisionCylinder
    		CollisionRadius=+0064.000000
    		CollisionHeight=+0064.000000
    		BlockNonZeroExtent=true
    		BlockZeroExtent=true
    		BlockActors=true
    		CollideActors=true
    	End Object
    	CollisionComponent=CollisionCylinder
    Follow my progress at:
    http://marscaleb.com/
    Read my new webcomic: Mischief in Maytia
    http://maytiacomic.com/

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

    Default

    Post that sword default properties. From which class you extending..?

    BTW. I don't see Components.Add(CollisionCylinder)
    Last edited by VendorX; 03-21-2012 at 07:01 PM.

  26. #26
    Iron Guard
    Join Date
    Sep 2008
    Location
    Utah or California
    Posts
    566
    Gamer IDs

    Gamertag: Marscaleb PSN ID: Marscaleb

    Default

    As requested, the complete default properties of this class, which extends from actor.

    Code:
    defaultproperties
    {
        MeleeAttackDamage=100
    
    	// Add the static mesh component
    	Begin Object Class=StaticMeshComponent Name=MyStaticMeshComponent
    		StaticMesh=StaticMesh'MCUniversal.Effects.BilboardSquare128_64'
    		bOnlyOwnerSee=false
    		CastShadow=false
    		bForceDirectLightMap=true
    		bCastDynamicShadow=false
    		CollideActors=true
    		BlockRigidBody=false
    		Translation=(X=64.0,Y=0.0,Z=16.0)
    		Rotation=(Pitch=0,Yaw=32768,Roll=0)
    	End Object
    	Components.Add(MyStaticMeshComponent)
    
    	Begin Object Class=CylinderComponent Name=CollisionCylinder
    		CollisionRadius=+0064.000000
    		CollisionHeight=+0064.000000
    		BlockNonZeroExtent=true
    		BlockZeroExtent=true
    		BlockActors=true
    		CollideActors=true
    	End Object
    	CollisionComponent=CollisionCylinder
    	Components.Add(CollisionCylinder)
    
    }
    And I want the collision to use a box shape, but I can't get it to use the collision I gave to the static mesh, and last I checked there was no box primitive.
    Follow my progress at:
    http://marscaleb.com/
    Read my new webcomic: Mischief in Maytia
    http://maytiacomic.com/

  27. #27
    Boomshot
    Join Date
    Aug 2011
    Posts
    2,920

    Default

    I don't see the actor collision flags.

    Sometimes a flag appears in both the Actor properties and the Component properties. In this case the Actor one acts as an override.
    http://udn.epicgames.com/Three/CollisionTechnicalGuide.html


  28. #28
    Iron Guard
    Join Date
    Sep 2008
    Location
    Utah or California
    Posts
    566
    Gamer IDs

    Gamertag: Marscaleb PSN ID: Marscaleb

    Default

    Okay, I got it. I was held up for a while because the documentation just says "CollideActors" but the variable is "bCollideActors."

    Thanks for the help!
    Follow my progress at:
    http://marscaleb.com/
    Read my new webcomic: Mischief in Maytia
    http://maytiacomic.com/


 

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.