Announcement

Collapse
No announcement yet.

Spawning and Moving a Mesh

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

    Spawning and Moving a Mesh

    I am working on a level for a school project in which a player will step on any of a number of triggers throughout the level, and a destructible object will be spawned and fire at the player, and the player will have to shoot it in order to destroy it and save themselves from taking damage.

    I've been trying to set this up in Kismet, but haven't had a lot of luck. I can spawn a static mesh as a rigidbody or as a UTKActor, but neither of these objects will move the way I want them to -- toward the player's current location.

    This is my biggest problem here: moving a mesh complete with collision, without using Matinee (since the destination has to be dynamic).

    Any ideas?

    #2
    Benguin, from my experience the only decent mesh an actor factory spawns is a skeletal mesh, you definitely can't do movers and I'm unsure about KActors but I think its the same principle. A KActor would be your best bet if you were to do that method.

    I think a better way to do it (without using Matinee) would be to have your destructible object hidden outside of the level, then when the even happens you teleport the object to its destination and then use a 'Get location and rotation' action. The target would be the player and then expose a location vector. From the out of the Get Loc and Rot have a Set Variable - Vector action and have the target as the location vector you just created and then make a new 'Spawn Projectile' action. Create a Target location and attach the Value from the 'Vector' node to it. Instigator I think would be your destructible object.

    Click image for larger version

Name:	KismetExample.jpg
Views:	1
Size:	67.7 KB
ID:	3248873

    Something similar to that picture. You may not even need to teleport the destructible object, you could just always have the display properties set to Hidden.

    Comment


      #3
      I've emulated the sequence you presented perfectly. The mesh teleports as required, but immediately plops to the ground without launching itself at the player. It also returns a warning regarding the Projectile Instigator (the KActor).

      Just for kicks, I assigned a grenade to the "Spawn Projectile" action's projectile class, and it spit out a random grenade a little bit to one side of it. I'm guessing this was not the intended behavior. I'm investigating the projectile's behavior to see if there's merit there for my situation

      Ideally, what I'd really like is for there to be a KActor floating in the environment, hidden, and then unhide and activate that KActor with a trigger that sets it moving in the direction of the trigger's instigator (the player).

      I just don't know what node or sequence can pull this off in Kismet.

      If I have to just very strategically place these things and use Matinees, I can, but the other way feels a bit more authentic to my situation. I've also discussed the possibility of creating a custom projectile with my team, and they think it's doable, but I'd like to work out how to make this thing move to where I want it to go.

      Comment


        #4
        bit off-topic, but why does everyone says 'for a school-project?'. excuses aren't needed, we wont judge on that.

        Further, it's beyond my knowledge, rather also with the possibility, to spawn and move a mesh in the way you desire.

        Comment


          #5
          Originally posted by Anhrak View Post
          bit off-topic, but why does everyone says 'for a school-project?'. excuses aren't needed, we wont judge on that.

          Further, it's beyond my knowledge, rather also with the possibility, to spawn and move a mesh in the way you desire.
          I wasn't trying to make any kind of excuse -- I was just providing a little context. But thank you for reserving judgement!

          I'm starting to gather that it might be beyond possibility -- which is kind of baffling, because it seems like such a simple thing.

          Comment

          Working...
          X