Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is there a way to deform a gameobject?
#5
(05-11-2023, 10:27 AM)_Aka_ Wrote: You would need to make a script, called after the OnRefresh events, that takes the input game objects, and copy whatever data to the output game objects.

How would this be done? 

1) The easiest but slowest way would just to copy the original object component data and pass it into the output somehow. Via Get/Add Component.

2) Maybe having two outputs sorta. 1. is the game objects with their scripts, 2. is the curved mesh. I'd loop through the CGMeshResource, grab its mesh/bounds data, and pass that into my new game objects. (Is this what you meant?) 

3) A faster performant way would be to somehow allow pooling of the new objects natively with the renderer.

(05-11-2023, 10:27 AM)_Aka_ Wrote: PS: I told you earlier that I was busy because of something, now I can talk about it: it is the spring sale on the asset store.

Oooh! I see now. Awesome! I actually was able to solve my closed problem, as well as modify the script to position things better. My issue now is not having curved objects with their original script data anymore.
Reply


Messages In This Thread
Is there a way to deform a gameobject? - by Lupos - 05-09-2023, 08:38 PM
RE: Is there a way to deform a gameobject? - by Lupos - 05-11-2023, 12:50 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Using Prefabs with transformations reset to original state when using Deform mesh danne_lindwall 3 6 04-28-2023, 01:35 PM
Last Post: _Aka_
  Way to make gameobject follow splines 'human-ly'? yun844 3 11 01-17-2023, 10:18 AM
Last Post: _Aka_
Question Squash To Fit Option for Deform Mesh? richard_firehose 1 12 11-05-2022, 02:25 PM
Last Post: _Aka_
  Scale Deform Mesh Along Spline? / aligning colliders MamasToast 9 71 10-31-2022, 03:44 AM
Last Post: tairoark

Forum Jump: