playMaker

Author Topic: Get Axis Vector never ends, and iTween Rotate Add never starts?  (Read 1493 times)

westingtyler

  • Sr. Member
  • ****
  • Posts: 277
    • My Video Game Projects Web Site
i am trying to use the left xpad thumbstick to rotate a 3d object so you can view it from different angles.

i have a state that gets the axis vector of the left stick and then does operations on it then Sets Rotation of the object.

The problem is, the object snaps back to original rotation when i release the stick, and I want the object to slowly rotate continuously depending on the direction you input so that even if you release the left stick, the object will remain in the new rotation angle. (I am trying to replicate the examine item view from Resident Evil HD, where you can rotate objects then examine them again to find new details, like a symbol on the bottom of a key to discover its name.)

so I set up the state to get the axis vector then added an itween rotate add event to add the new vector. but the itween rotate add never does anything and seems to work only for one frame if at all then is ignored forever as the Get Axis Vector keeps going.

so I instead created two states to cycle between with a next frame event in between. the get axis vector state, and the itween rotate add state. but the first state never ends. I even added a set bool then a test bool to send an event, even checked them for Every Frame, but they never register and are ignored, while the Get Axis Vector seems to dominate the state and occur every frame, even though there's no Every Frame option to check.

so I am totally unsure how to make this work since, as I've mentioned, the Get Axis Vector never ends, and the iTween Rotate Add never even begins, whether in the same state or different ones. It's driving me nuts.


djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Get Axis Vector never ends, and iTween Rotate Add never starts?
« Reply #1 on: July 01, 2018, 05:36:35 PM »
Hi,
Have you tried using 'rotate and' turn on "per second"?

But you might need to use 2 'Get Axis' (multiplier around 100 depending on the speed you wish to use to rotate) instead of get axis vector and possible a 'float multiply' and multiply by -1 to flip the direction.

westingtyler

  • Sr. Member
  • ****
  • Posts: 277
    • My Video Game Projects Web Site
Re: Get Axis Vector never ends, and iTween Rotate Add never starts?
« Reply #2 on: July 02, 2018, 12:28:24 PM »
cool i will look into this. when you said 'rotate and' was that an error you made or is that an action or a tickbox somewhere? am I right to use iTween Rotate Add?

verybinary

  • Junior Playmaker
  • **
  • Posts: 81
    • The Museum of Digital
Re: Get Axis Vector never ends, and iTween Rotate Add never starts?
« Reply #3 on: July 03, 2018, 11:32:49 AM »
can you have the object rotating constantly? (even starting at 0 speed) and use the axis to determine vector and speed?

quick break down: put an fsm on the object with a rotate. every frame speed is a local global var, axis is a local global var.
new object to get input. add an fsm and get axis vector(maybe just "get axis") every frame to determine direction, and the axis float to determine speed. set those two to the local globals in the other fsm.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Get Axis Vector never ends, and iTween Rotate Add never starts?
« Reply #4 on: July 03, 2018, 12:27:49 PM »
Hi.
I mean 'Rotate' and tick box "per second"

iTween is outdated.

I made a quick video to check what i mean :