Home Technical Talk

Rendering the Trajectory Path a projectile would travel though if thrown?

polycounter lvl 10
Offline / Send Message
JValencia polycounter lvl 10
Hey, guys!

As the title states, I've been stuck trying to figure out how to draw the trajectory path a projectile would travel though if thrown. Here are some examples of what I am talking about:
575455-gears-of-war-3-xbox-360-screenshot-aiming-grenades-displays.jpg
640d85e7ddd19d42436ac0e17bf40bb9030ed042.jpg__620x348_q85.jpg
389261101517067003368032037595946njpg-30b3c8_640w.jpg

I have the mechanic working in game with access to all of the vectors along the arc. That being said, I have not managed to get this to work on the FX side of things.

Here is what I've attempted thus far, using particles:
  • Moving a Ribbon particle along all of the arc points does not work, as the update rate of the arc happens too frequently. Slowing down the update rate of the arc is also not an option ( gameplay reasons ). It seems that a Ribbon can only draw its sheets correctly if given enough time to do so. Since the arc needs to be re-drawn every frame, the ribbon cannot keep up. Resetting the ribbon simulation frequently also causes it not to be drawn ( no clue why ).
  • Using a Beam particle and setting the Start and End points accordingly. This method did also not work for me, as only a straight line was drawn.
I've dug through all of Google to find an answer for this, but it seems like there is no posted public solution to this problem.

I am using UE3 for this, but I thought I'd post this on the main Technical Forum instead of the UDK one, as the solution to this is not UDK dependent.

Does anyone have any ideas on how this should be done? Or have seen how this was done at other studios?

Thank you!:)

Replies

  • AlexCatMasterSupreme
    Offline / Send Message
    AlexCatMasterSupreme interpolator
    Show what you have.
  • JValencia
    Offline / Send Message
    JValencia polycounter lvl 10
    Here are the settings for the Ribbon particle I am using for the trail:

    14170182508_0890044e40_o.jpg

    I've used other Ribbons with similar settings for other things (bullet tracers, etc.), and they work just fine.


    Here is how I am making use of the Ribbon through script after I have obtained all of the vectors along the path:
    local Vector                 vPos;
    
    // TrajPathEmitter is the ref to the ribbon particle I posted above.
    TrajPathEmitter.ParticleSystemComponent.SetActive( true );
    
    foreach TrajPathVectorList( vPos ) {
        TrajPathEmitter.SetLocation( vPos );
        //  Have also tried: TrajPathEmitter.Move( vPos - TrajPathEmitter.Location );
    }
    

    The ribbon will disappear once the simulation is reset. The times it doesn't reset, it just appear at the start and end points.
    I've added other miscellaneous particles inside the ribbon one, just to test if I was resetting the particle wrong, or if resetting a particle too often is a general problem. Turns out it was just the Ribbon module - all other particles reset just fine.

    But I feel that the entire approach I post above, probably isn't even the correct way to go about handling this problem. nAaTzw[IMG]http://www.polycount.com/forum/<iframe src="<a href=https://www.flickr.com/photos/125102595@N04/14170182508/player/&quot; target=_blank>https://www.flickr.com/photos/125102595@N04/14170182508/player/"</a&gt; width="75" height="75" frameborder="0" allowfullscreen webkitallowfullscreen mozallowfullscreen oallowfullscreen msallowfullscreen></iframe>[/IMG]
Sign In or Register to comment.