Neos-Metaverse / NeosPublic

A public issue/wiki only repository for the NeosVR project
197 stars 9 forks source link

FloatQDriver Component Request #2927

Open SoxVR opened 3 years ago

SoxVR commented 3 years ago

Is your feature request related to a problem? Please describe.

In the past i had an idea for something which required me to drive to XYZ Rotations separately, so i was looking for a FloatQDriver since i was aware of the Float(2/3/4)Driver but could discovered it was not a component.

I am aware that this can be done via LogiX but i wanted to see if i could do this via components instead but was unable to do so due to this.

Relevant issues

No response

Describe the solution you'd like

There is already a Float2Driver, Float3Driver and a Float4Driver. Would it be possible to have a FloatQDriver component added.

Describe alternatives you've considered

N/A

Additional context

No response

Frooxius commented 3 years ago

What would be the usecase of this? Generally you don't work with the raw quaternion values directly, because it's very easy to compose a degenerate quaternion that will cause a number of issues, they need to be computed in a special way.

shadowpanther commented 3 years ago

Judging from "to drive to XYZ", I would assume that Sox wants a Driver component similar to Float4Driver that takes 3 floats as Euler rotations, converts those to a quaternion and drives the target floatQ field with it.

-> Pack xyz -> From Euler -> in components, basically.

@Sox-NeosVR am I correct in this assumption?

Frooxius commented 3 years ago

We could do that one if that's what's being requested. It would be something like FloatQEulerDriver in that case, since it would actually calculate the quaternion from the euler angles.