#Make a continuous rotation with "Set Rotation" circuit

21 messages · Page 1 of 1 (latest)

gusty pike
#

Hello, I would like to make a continuous rotation like you can do with a gizmo rotator but using the "Set Rotation" circuit.

I'm really lost with all that Quaternion things, could someone help me please?

cedar cliff
#

Rotator set speed

gusty pike
#

But i dont want to use the rotator gizmo (cv2) @cedar cliff

#

Just the "Set Rotation" chip

cedar cliff
dapper cloud
#

Get rotation>split>add x value to any axis>quaternion create?

#

Also may I ask what this is for ? I'm curious

dapper cloud
cedar cliff
dapper cloud
cedar cliff
#

But I'll try again

dapper cloud
#

I'll try

cedar cliff
dapper cloud
#

yeah it does something weird

cedar cliff
dapper cloud
#

Yeah cause rotation automatically gets normalized

gentle hornet
# gusty pike Hello, I would like to make a continuous rotation like you can do with a gizmo r...

@dapper cloud @cedar cliff @gusty pike

Use the chip Quaternion Create Angle Axis or Quaternion Create Euler Angles

Quaternion Create Angle Axis method:
Set the rotation of the object to Rotation * Quaternion Create Angle Axis (Multiplication order matters, A x B = Rotate A by B)
With Quaternion Create Angle Axis, the "Axis" you input is the axis in which it spins, for example, if you wanted to rotate around the objects up vector, you would set the axis to the objects up vector. The "Angle" you input is how far clockwise around that axis it spins (in degrees), "Angle" should be Speed * Delta Time

Quaternion Create Euler Angles method:
This method is almost identical to the angle axis method, but you dont really get to control the axis it rotates around, but you do get to choose its rotation speed along either the objects X/Y/Z axis, or global X/Y/Z axis (Depending on your multiplication order)

Spawn in the chips Vector3 Create and Quaternion Create Euler Angles
Set the rotation of the object to Rotation * Quaternion Create Euler Angles
On the Vector3 Create:

  • The "X" axis is how fast you want it to spin around the local/global X axis
  • The "Y" axis is how fast you want it to spin around the local/global Y axis
  • The "Z" axis is how fast you want it to spin around the local/global Z axis
    All of these should be some form of Speed * Delta Time
    Spinning on local or global, like I said depends on your multiplication order
#

The reason you multiply Speed by Delta Time, is so the objects rotate in degrees per second, rather than degrees per execution

dapper cloud
#

Oh wait i remember doing angle axis method

gentle hornet