Results 1 to 2 of 2
  1. #1
    Skaarj
    Join Date
    May 2008
    Posts
    23
    Gamer IDs

    Gamertag: Kain Xavier

    Default Collision issues with UTProj_BioShot (and possibly static meshes in general)

    I derived a class from UTProj_BioShot that relies upon the data from a HitNormal to "push" away from the surface. However, I have noticed that the HitNormal becomes unreliable when the projectile is fired onto a flat portion of the ceiling or the floor. To give an example, firing straight up at a ceiling results in a HitNormal of (-1, 0, 0) which as you can imagine breaks my code. (I believe this also breaks Epic's code in regards to which hit emitter to render.)

    Oddly enough, UTProj_BioGlob does not have this problem. At first I thought it had to do with the size of the collision cylinder, (UTProj_BioGlob's is smaller than UTProj_BioShot,) but that made no difference. Now I am wondering if it is because UTProj_BioGlob uses a skeletal mesh rather than a static mesh like its parent. Has anyone else run into a similar issue? Should I just go with a skeletal mesh rather than a static mesh? Or should I get rid of the collision cylinder and just enable collide actors on the static mesh?

  2. #2
    Skaarj
    Join Date
    May 2008
    Posts
    23
    Gamer IDs

    Gamertag: Kain Xavier

    Default

    Okay first off, I was mistaken. There is not an issue with the HitNormal when it is fired at a flat surface, at least not initially.

    Code:
    CollisionComponent.SetTranslation( vect(16,0,0) );
    The above line of code is responsible for skewing subsequent HitNormal data. Setting the translation back to vect(0,0,0) (the original value,) or even vect(-16,0,0) does not seem to alleviate the issue either. Thankfully, commenting out this line of code seems to have zero effect on collision detection and only positive effects for what I set out to do.

    So my issue is solved but this begs a new question, what exactly does this function do? I'm assuming it gets called to shift the collision cylinder to the center of the goo puddle but why would that turn a HitNormal of vect(0,0,-1) into vect(-1,0,0)? And why would setting the translation back to its prior value not fix it?


 

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.