#Im not really sure why you need this,

1 messages · Page 1 of 1 (latest)

turbid wraith
#

why not a struct?

vernal haven
#

Ah that didnt all paste under the quote, hard to see on mobile

#

Basically theres no reason to use a struct here. Itd contain a lot of data, and doesnt really represent a primitive value.

turbid wraith
#

Hmm, here's what seems to be accurate for my usecase:
✅ immutable
✅ represents a singular value (in my case, it's a transformation across a single frame)
❌ size under 16 bytes

vernal haven
turbid wraith
#

Do you have an example of a struct, composed of multiple primitives, which you might collectively consider "one primitive"? It seems that, definitionally, you can never consider a struct a representation of a single value

vernal haven
#

Its really not common to need structs. Most objects you'll make will be classes

turbid wraith
#

okay, yeah, duh, Vectors are structs themselves

#

Thanks!

turbid wraith
vernal haven
turbid wraith
#

Oh, sorry, I shared the context of what I'm working in another thread, but not this one: https://discord.com/channels/489222168727519232/1288182260968718358
hitbox editing example
Basically, I have a Hitbox object that goes through transform transitions on a per-frame basis, and I'm trying to improve the hitbox transform workflow, but existing solutions that I've come across don't work for me because:

  • it seems to me that Unity's native Animation editing has a lot of unnecessary baggage for my usecase
  • hitbox editors for existing fighting games don't generalize enough to the implementation of my game
#

I think Unity's animation workflow is meant for visual rendering, and isn't designed for discrete state transitions

vernal haven
#

I see, yea they information given to you in that thread seems good. Im not too sure about this kind of work myself