x


enable disable objects when objects collides with other object

how can i disable a object when the object collides with another object and changes to the object that it collided with ie. object a collides with object b and changes to object b.

more ▼

asked Jun 09 '11 at 01:22 PM

smasgames gravatar image

smasgames
34 25 29 32

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

1 answer: sort voted first

I think so, you must activate the object isTrigger:

object : Transform;

function OnTriggerEnter (other : Collider) { if(hit.object) { object.enabled = false; } }

Hope this help ;D ask any questions

more ▼

answered Jun 09 '11 at 02:02 PM

Unamine gravatar image

Unamine
362 14 17 27

were do i put this script to? player object or the other object?

Jun 09 '11 at 03:10 PM smasgames

(1,1): BCE0044: expecting EOF, found 'object'.

Jun 09 '11 at 05:06 PM smasgames
(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:

x2491
x1093
x379
x215
x133

asked: Jun 09 '11 at 01:22 PM

Seen: 1214 times

Last Updated: Jun 09 '11 at 05:06 PM