Announcement

Collapse
No announcement yet.

sword trace, problem with axis

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

    sword trace, problem with axis

    i want to set tracers on my sword to detect hits. the first one works fine but if i want the second one to be 20px higher on the blade it doesnt work. i think it has something to do that i try to add 20 to the X vector and he's taking the X axis from the world and not from the sword itself.

    how do i fix this problem? any ideas?

    Click image for larger version

Name:	12319-tracer.jpg
Views:	1
Size:	169.7 KB
ID:	1137327
    Click image for larger version

Name:	12318-tracer1.jpg
Views:	1
Size:	63.9 KB
ID:	1137328

    #2
    I think it is better to not using trace to detect hits. Why? because it is slower to perform than collision shapes.
    Use a regular box collision object to wrap around your sword and let the collision do hit detection.
    (you can use multiple box as well if you want damage difference.)
    Unreal Engine 4 Game Framework diagram for relation of all major base object types
    Unreal Engine 4 Input Event diagram, scroll down to section Input Processing Procedural
    Resident Evil Classic Camera
    RPCs official document, Must Read
    Everything you should know about replication

    Comment


      #3
      To be honest i took the trace because i thought it drains less performance than collision shapes. Can i turn the collision shape to off if im not making my attack animation? Otherwise it would permanently check for collisions what also drains alot of performance right?

      Comment


        #4
        Im not really sure about this collision thing. I tried to run several times trough a sword with collision and sometimes he doesnt respond. Btw, how do i ignore the player which is wearing the sword because netcode and so on. :P

        Comment


          #5
          So far i had much better results using traces instead of collision shapes, in fact i had a much better detection with traces..Im doing about 13 Traces along my sword blade and the perfomance hit is null, ( im also interpolating the location, check the location before current and previous frame and make a trace in-between to avoid missing spaces and i use only 2 sockets for the traces with math )

          To ignore the player wearing the sword before applying damage / whatever action you want , check that the hit actor isnt the weapon owner
          Offering my Freelance Game Design ,Counselling and C++ Programming Skills!
          https://forums.unrealengine.com/show...ner-Counseling

          Marketplace Assets
          Melee Tracing Plugin:https://forums.unrealengine.com/show...Tracing-Plugin
          Medieval Combat Starter Kit:https://forums.unrealengine.com/show...at-Starter-Kit
          Foliage To Blueprint:https://www.unrealengine.com/marketp...e-to-blueprint

          Comment


            #6
            alvarofer so if your system works, could you tell me where i got the failure with the location? Did you used several single line tracers or multi line?

            Comment

            Working...
            X