playMaker

Author Topic: How to rotate 360° with Vector3 Variable [SOLVED]  (Read 2080 times)

vonpopov

  • Junior Playmaker
  • **
  • Posts: 98
How to rotate 360° with Vector3 Variable [SOLVED]
« on: January 22, 2014, 01:08:29 PM »
Hi,

I am now working on a way to rotate an object using a Vector3 variable.
(360° on XZ)

Here is what i did :


And it works ... BUT ... it starts going crazy over 180°.
- On X axe, it cannot pass throught 180°
- On Z axe, it go throught 180° but, it starts to add some random ° on Y.

I don't know why ? ...

I tryed with a get button action, on a specific axe, and ... it works. But i really want to use a Vector3 fonction, not a Floating one.


Halp  :P

« Last Edit: January 23, 2014, 01:39:02 PM by vonpopov »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: How to rotate 360° with Vector3 Variable
« Reply #1 on: January 22, 2014, 01:35:22 PM »
Weird. You shouldn't see any sort of gimbal lock when using a rotation like that because you're simply adding a value to the current rotation instead of declaring a Euler angle.

Can you do this on a blank cube and still get the effect? I tried and it worked fine, so maybe something else is causing it.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

redikann

  • Full Member
  • ***
  • Posts: 174
Re: How to rotate 360° with Vector3 Variable
« Reply #2 on: January 22, 2014, 03:38:12 PM »
I personally find it better to use world space when you get a vector 3 relative to another object. But your situation might be entirely different.

vonpopov

  • Junior Playmaker
  • **
  • Posts: 98
Re: How to rotate 360° with Vector3 Variable
« Reply #3 on: January 22, 2014, 03:44:27 PM »
You were right ! it was supposed to work.
I found the problem. You can't have it working right if your model already have some rotation value.

Model has to be x 0 , y 0 , z 0 at start.

It works now, this is cool, thanks you for testing on your side and finding playmaker actions was ok :)