Ooops
October 27, 2021, 07:18:18

Author Topic: Fit object to bounds  (Read 2084 times)

GfK

  • Guest
Fit object to bounds
« on: January 23, 2018, 20:52:52 »
.

Offline Steve Elliott

  • Hero Member
  • *****
  • Posts: 3237
  • elgol
Re: Fit object to bounds
« Reply #1 on: January 24, 2018, 18:25:15 »
ENAY is probably the man to answer your question.  Hopefully he'll jump in at some point.
Windows 10 64-bit, 16Gb RAM, Intel i5 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb)
MacOS Big Sur 64-bit, 8Gb RAM, Intel i5 2.3 Ghz, Intel Iris Plus Graphics 640 1536 MB
Linux Mint 19.3 64-bit, 16Gb RAM, Intel i5 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb)
Raspberry pi 3, pi 4, pi 400, BBC B, C64, ZX Spectrum

Offline ENAY

  • Full Member
  • ***
  • Posts: 247
Re: Fit object to bounds
« Reply #2 on: January 29, 2018, 03:34:32 »
Hi Dave, do you have it solved, except you're trying to get the scale to match up correctly to a certain size?

Not entirely sure what you're trying to achieve.

Have you seen this post?

https://answers.unity.com/questions/1268885/rescaling-mesh-or-gameobject-to-fit-in-gui-rect.html

Offline ENAY

  • Full Member
  • ***
  • Posts: 247
Re: Fit object to bounds
« Reply #3 on: January 30, 2018, 01:25:23 »
RenderToTexture in Unity is awesome. Good luck with your project Dave.

Not really related to your project but if you're fannying about with viewable and non viewable objects in and outside a hub. I highly recommend reading up on stencil shaders, for Z ordering, and hiding and showing objects in various camera was really handy.

Will only take up 10 mins your time. Just watch this video. I did and it really helped. :)

&t=102s


 

SimplePortal 2.3.6 © 2008-2014, SimplePortal