1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Collision cylinders: Where are they?

Discussion in 'Programming' started by Chuckleberry_Finn, Mar 5, 2002.

  1. Chuckleberry_Finn

    Chuckleberry_Finn I am become Steven Seagal.

    Joined:
    Feb 25, 2002
    Messages:
    23
    Likes Received:
    0
    Hi,

    Sorry to post so many damn messages, but hell, I need answers. :)

    Anyways, I've just started experimenting with importing my own models into the game, and I think I'm having some problems with collision cylinders. Just as an initial test, I've rigged up a little device that's supposed to spawn a rectangular model in front of the player (like a temporary wall). When I used a "stock" model (the QueenShield wingding), it would spawn in front of me, and the collision seemed normal, in that I couldn't shoot through it, etc. Having gotten that to work, I tried making my own model and importing it, just a rectangle. I get it to spawn just like the first one, but it seems like it's collision cylinder isn't lined up with the actual model. In fact, if I didn't know any better, I'd say it's collision cylinder was directly on top of me (the player), instead of around the rectangle 100 clicks in front of me. I say this because when I shoot directly forward at the rectangle, my projectiles pass right through it. But when I point a certain amount up or down and shoot (nowhere near the rectangle), my projectiles collide with thin air. This suggests to me that when I'm point my gun straight ahead, it extends beyond the edge of a collision cylinder, so the projectiles never actually touch it, whereas when i put up or down enough, the spawn point for the projectiles are still within the cyclinder, and collide.

    Now, I have no idea if that's what's actually happening, but am wondering how the game knows where to put the collision cylinders on newly imported models. Does it happen automatically, or am I supposed to set it somehow? If so, how? I generally followed a modelling tutorial to get my rectangle into the game, and I'm pretty sure it never said anything about setting collision cylinders... Also, is there any way to actually see the cylinders themselves in addition to the models?

    Thanks.

    I forgot to add that in the case of my rectangle, it's a trailer that follows the player around. I don't know if that has any bearing on the situation.
     
  2. Papapishu

    Papapishu 我是康

    Joined:
    Jun 18, 2001
    Messages:
    2,043
    Likes Received:
    0
    Try to add the wall in Unrealed ad turn on Radi view to see where it's colision cylinder is.
    Maybe it's just that your model have ended up outside it.
    What happens if you set it's physics to PHYS_Falling?
    Does the model fall through the floor?
    In that case it seems as if you model have ended up "below" the "floor" when importing it.
    Then it might have something to do with the editing program.
    I'm not sure but I think that the moddle of the model should go in the middle of the 3D-space (the origo)
    Weapons are so.
    The origo is the place the player holds the weapon, so you must put the handle there...
    If you put the weapon below the "floor" the player's hand get stuck inside the weapon...
    I think this might be the case of the coll cyll too...
     
  3. Chuckleberry_Finn

    Chuckleberry_Finn I am become Steven Seagal.

    Joined:
    Feb 25, 2002
    Messages:
    23
    Likes Received:
    0
    It seems to be something about PHYS_Trailer. When I give it PHYS_Walking and spawn it as a stationary object the hit detection is fine. But when it's a trailer trailing the player, it's buggered. Still trying to figure out why...
     
  4. Chuckleberry_Finn

    Chuckleberry_Finn I am become Steven Seagal.

    Joined:
    Feb 25, 2002
    Messages:
    23
    Likes Received:
    0
    Well, this makes ZERO sense to me. I've been screwing around with the thing all day, and it's still messed up. In any physics mode other than trailer, it works fine... the collision cylinder is right on top of the model. But when I set it to be a trailer and use PrePivot to put it out in front of the player, the model goes where I tell it to, but it's collision cylinder stays right on top of the player. WTF? Why the bloody hell would this be happening?

    I did some tests, and it's collision cylinder is definitely on top of the player. I added some code to create a visual effect when the "wall" gets hit, which goes off when I hit myself with a projectile.

    I really don't understand how the model and it's collision cylinder could possibly be separated. Can anyone help me?

    Thanks!
     
  5. Chuckleberry_Finn

    Chuckleberry_Finn I am become Steven Seagal.

    Joined:
    Feb 25, 2002
    Messages:
    23
    Likes Received:
    0
    I feel like I'm talking to myself here. :)

    I did a little more testing. If I use DT_Sprite to render my wall (still PHYS_Trailer), it works perfectly. The collision cylinder is lined up with the sprite, which out in front of the player, not right on top of him. But if I use DT_Mesh? Buggered.

    So, either my model is somehow broken, which seems unlikely since it's just a bloody rectangle, or there's a conflict between meshes and PHYS_Trailer. Is there a rule somewhere that says a mesh can't be a trailer? This is really getting ridiculous.

    Thanks.
     
  6. aspie

    aspie It's all good baby.

    Joined:
    Feb 24, 2001
    Messages:
    315
    Likes Received:
    0
    where is your model in relation to the origin of the editing grid (in your modelling program) this could make the model's cylinder off centre
     
  7. Chuckleberry_Finn

    Chuckleberry_Finn I am become Steven Seagal.

    Joined:
    Feb 25, 2002
    Messages:
    23
    Likes Received:
    0
    Turns out it has nothing to do with my model in particular, as I tried using some other "stock" models, and had the exact same problem.

    I read somewhere that objects with PHYS_Trailer have no collision physics... can anyone confirm or deny this? The problem is that it works fine as a sprite, just not as a mesh. But I kind of need it to be a mesh, so I dunno.

    As far as I'm concerned it's some kind of bug with mesh trailers. Has anyone else ever tried to use a mesh as a trailer and had collision problems?
     

Share This Page