Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Custom hatch falls through the floor
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#1
Custom hatch falls through the floor

So, the hatch I've made falls through the floor and I have no idea what's causing it. Was making a video of it before but it doesnt seem to work anymore. So I do it with images instead.

When hatch is static:
Spoiler below!
[Image: FKlcBjX.jpg?1]

When hatch is not static:
Spoiler below!
[Image: g7idizp.jpg?1]

Derp.
(This post was last modified: 05-18-2014, 04:32 PM by Neelke.)
05-18-2014, 04:20 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: Custom hatch falls through the floor

How did you make it? Don't you have a static part that it's attached to? What's the entity type? You can always try to look at the original hatches and see how they are made. Try to replicate them if you want them to act similarly.

05-18-2014, 06:25 PM
Find
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#3
RE: Custom hatch falls through the floor

It's a SwingDoor. I did the same variables as the hatch_ceiling. Here is the picture of the model itself (nothing special looking really, but it works).

Spoiler below!
[Image: 9N5ySUm.jpg?2]

And this below is how all the bodies and hinges are currently behaving.

Frame:

Body Material = Rock
Mass = 0
Angular Damping = 0
Linear Damping = 0
Max Angular Speed = 0
Max Linear Speed = 0
Buoyancy density mul = 1

Blocks sound = true
Continuous collision = true
Can attach character = true
Pushed by character gravity = true
Collide character = true
Collide non character = true
Volatile = false
Use surface effects = true
Has gravity = true

Door:

Body Material = Rock
Mass = 10
Angular Damping = 0
Linear Damping = 0
Max Angular Speed = 0
Max Linear Speed = 0
Buoyancy density mul = 1

Blocks sound = true
Continuous collision = true
Can attach character = true
Pushed by character gravity = true
Collide character = true
Collide non character = true
Volatile = false
Use surface effects = true
Has gravity = true

Joint:

Sticky Min Limit = true
Sticky Max Limit = true
Limit Step Count = 0
Collide Bodies = true
Breakable = false
Break Force = 0

Min Angle = -135
Max Angle = 0

Move Type = Angular
Move Sound = joint_sewer_door.snt (just like hatch_ceiling)

I feel like the rest aint necessary from this point.

I havent clicked Set Parent/Child Body on the joint. Should I do so? Or is there something wrong with this above?

Derp.
(This post was last modified: 05-18-2014, 08:08 PM by Neelke.)
05-18-2014, 08:08 PM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#4
RE: Custom hatch falls through the floor

Yes, set its parent/child. Parent for the static body, child for the door. So, two bodies.
Gravity on the door should be on, mass about 5 or 10, and collision with player/stuff on.
If the door goes mad in-game, make its body a little smaller than the model, so it doesn't collide with any border or anything nearby.
Check the attachments as well, the door model should be attached only to the body you made for it.
For your hatch I think you're gonna need to enable that option named Sticky Minimum on the hinge so the door stays in place until the player comes and moves it.

05-18-2014, 09:17 PM
Find
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#5
RE: Custom hatch falls through the floor

Well, at least it doesn't fall through the map. But now I encountered another issue. Now it only rotates around, like when turning a wheel except that it rotates from the joint. I want it to be like the hatch_ceiling entity. I'm gonna assume you know how that hatch functions.

I think I need to change the MoveAxis in the joint or User Defined Variables. But I cannot really find it.

Derp.
05-18-2014, 09:34 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#6
RE: Custom hatch falls through the floor

What joint type did you use? There are several. I think JointHinge is the one you want.

05-18-2014, 09:52 PM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#7
RE: Custom hatch falls through the floor

I don't understand what you mean. Sorry.

05-19-2014, 12:29 AM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#8
RE: Custom hatch falls through the floor

[Image: diDGEvg.png]

Edit: Damn, again I misread the poster >o<
Oh well, it never hurts to explain a bit more.

(This post was last modified: 05-19-2014, 01:30 AM by Mudbill.)
05-19-2014, 01:29 AM
Find
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#9
RE: Custom hatch falls through the floor

Well, with Asbergers along the way, it makes it incredibly difficult to explain it properly.

And Mudbill, I use a hinge joint.

Derp.
05-19-2014, 02:27 PM
Find




Users browsing this thread: 3 Guest(s)