playMaker

Author Topic: SET Quaternion?  (Read 1302 times)

cmonroy

  • Playmaker Newbie
  • *
  • Posts: 34
    • View Profile
SET Quaternion?
« on: November 03, 2014, 08:11:44 PM »
I want to store several quaternions in global variables to be used as needed in my game, but there is no equivalent action like SetVector3XYZ. Is there any other way to accomplish this?

Thank you!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14595
  • Official Playmaker Support
    • View Profile
Re: SET Quaternion?
« Reply #1 on: November 04, 2014, 12:40:57 AM »
Hi,

 You want to work with the quaternion matrix directly? or want to set euler angles?

Also, have you seen the set of quaternion actions I created?

https://hutonggames.fogbugz.com/default.asp?W967

you'll also find them via the [ur=https://hutonggames.fogbugz.com/default.asp?W1181l]ecosystem[/url].

 Bye,

 Jean


cmonroy

  • Playmaker Newbie
  • *
  • Posts: 34
    • View Profile
Re: SET Quaternion?
« Reply #2 on: November 04, 2014, 06:35:00 PM »
Thank you Jean.

I've already downloaded the Quaternion library and found it didn't include a SET QUATERNION action.

I have a fixed-height, fixed-distance camera attached to my character that can be switched between some predetermined values. Height and distance are controlled via the SetVector3XYZ, but their respective rotations have to be entered manually. Right now, I'm using 0, 90, 180 and 270 degrees to rotate the viewport, but adding more angles (like every 45, 30 or 15 degrees) or more axes become complicated. What I was thinking of was making a routine where you can set how many views to generate, 8 for instance, divide 360 / 8 and create the rotations procedurally.