x


How to stop first person player from walking through animated door

Hi

I have a door which is animating (opening and closing) I have a first person character I walk toward the door The door close and the character walks straight through.

I understand that if they were both rigid bodies physics would correctly position them

Is there a way to parent them if they come into contact Or it is easier to add a rigid body component to the player which is activated only when they come into contact?

more ▼

asked Oct 16 '10 at 10:09 AM

dmaxwell gravatar image

dmaxwell
137 16 17 24

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

There is really no need to use an animated model for doors. Move the center of the Y-axis,on the door model, far right/left and rotate the model around it from the script.

more ▼

answered Oct 16 '10 at 07:11 PM

IJM gravatar image

IJM
1.4k 2 5 19

In general you are absolutly right, but think of a really complex door (best example as an old half-life player i could think of is a Combine-door) that isn't just turn around one axis, but is mounted on a kind of a robotarm. In such a case you would use an animated door but even in HL2 they placed a simple invisible "collider" inside the door that is opening or just disappearing when the door is open. That way the logical and visual function is separated.

Jan 28 '11 at 11:02 AM Bunny83
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3936
x2584
x1948
x1081
x200

asked: Oct 16 '10 at 10:09 AM

Seen: 1618 times

Last Updated: Oct 16 '10 at 10:09 AM