x


How to find world coordinates within an object?

I was wondering is there already a way to find coordinates in world space that an object occupies (such as a cube for example) ?

more ▼

asked Nov 26 '11 at 12:43 PM

Tweetzzzzz gravatar image

Tweetzzzzz
1 2 2 3

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

1 answer: sort voted first

Yes! It depends on a few things, but you can use either collider.bounds, mesh.bounds or renderer.bounds depending on your requirements. The 'Bounds' object gives you all sorts of useful information about the world space that an object occupies!

more ▼

answered Nov 26 '11 at 02:41 PM

syclamoth gravatar image

syclamoth
14.8k 7 15 80

Otherwise, I guess you can just use transform.position?

Nov 26 '11 at 02:41 PM syclamoth

oh awesome thankyou

Nov 26 '11 at 11:49 PM Tweetzzzzz
(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:

x1095
x181
x109

asked: Nov 26 '11 at 12:43 PM

Seen: 1086 times

Last Updated: Nov 26 '11 at 11:49 PM