Sliding door collision problem

There are no stupid questions, just stupid answers.
6 posts Page 1 of 1
flysouth
Posts: 105
Joined: Sun May 15, 2016 10:16 am
by flysouth » Wed Aug 24, 2016 11:30 am
I created a swing door which had a collision mesh as a child. This works well and blocks player when closed and allows through when open. I have now created a sliding door using the same technique but in T3D the collision mesh does not move with the door. I read that this works if you put a bounding box around it but I tried that and things remained the same. I know that there is a door resource somewhere but I would like to do this without c++ changes.
If I view it in the T3d editor and show the collsion mesh it does move with the doors as can be seen in the image. However in the mission you can see in the middle a white square which seems to be the collision mesh. If I turn off collision then the player can pass through.

Attachments

map.jpg
map.jpg (22.51 KiB) Viewed 3766 times
edit.jpg
edit.jpg (55.46 KiB) Viewed 3766 times
flysouth
Posts: 105
Joined: Sun May 15, 2016 10:16 am
by flysouth » Wed Aug 24, 2016 7:33 pm
I did some more testing and discovered that I can shoot through the collision mesh and after 3 shots then it works correctly.
I made a new set of test doors just 2 cubes and they did exactly the same.
This is in ver 3.8.
It is almost like there is some sort of 'damage' layer on the collision mesh which once shot 3 times is destroyed?
Johxz
Posts: 444
Joined: Sat Feb 07, 2015 11:37 pm
by Johxz » Thu Aug 25, 2016 12:52 am
hmmmmm :roll: I have doors or objects with similar functions in my levels of course , I don't remember seeing this...

Any error in you console? Maybe you can hide the collision mesh if the door is open.
irei1as
Posts: 84
Joined: Fri Feb 27, 2015 5:13 pm
by irei1as » Thu Aug 25, 2016 9:36 am
Stock collision uses the root position. That is that only the base collision without animation is the one being used.
Using physX or bullet ~may~ avoid that but that uses a lot of c++ changes, I think.

What I use:
1. The door has no collision at all.
2. Create invisible TSStatic objects but with the collision the size of each door.
3. In script, use setTransform(...) with the TSStatic objects to position them where you need the collision.
TorqueFan
Posts: 130
Joined: Thu Apr 30, 2015 5:35 am
by TorqueFan » Fri Aug 26, 2016 3:34 pm
I created a swing door which had a collision mesh as a child.
Just to be clear, how exactly did you make the collision mesh a child of the door? Did you properly create and add the collision mesh in the model?

@ irei1as : That's an interesting approach.

It's been awhile since I messed with moving collisions but IIRC isn't it possible to just animate collision shapes in the model itself? Seems like I was able to do that once, but it required using more than one collision shape. /shrug
flysouth
Posts: 105
Joined: Sun May 15, 2016 10:16 am
by flysouth » Sat Aug 27, 2016 1:11 am
I created the mesh when I created the model. Because I made it a child of the model it moves when the door moves. The mesh does work but only after I have fire a few shots through it. I read somewhere that there was a player cash problem with moving collision meshes. The post was from a couple of years back so I am not sure if that still applies.
Strangely I did not have this problem with my swing door which was made the same way.
6 posts Page 1 of 1

Who is online

Users browsing this forum: No registered users and 5 guests