playMaker

Author Topic: Translate per second doesnt work [SOLVED]  (Read 3625 times)

phannDOTde

  • Full Member
  • ***
  • Posts: 237
    • Peter Hann .de
Translate per second doesnt work [SOLVED]
« on: January 16, 2014, 12:56:34 AM »
Hey, could someone please take a quik look at this simple sample and tell me why using "per second" at the translate action doesnt work here? If I turn it on nothing moves anymore. (using a Controller Imput to steer a cube XY in this sample).

Thanks
« Last Edit: January 16, 2014, 06:35:20 AM by phannDOTde »

redikann

  • Full Member
  • ***
  • Posts: 174
Re: Translate per second doesnt work
« Reply #1 on: January 16, 2014, 01:04:05 AM »
You have to many updates happening. Fixed is for physics and late is for say you want an animation to play and then move something. Stick with every frame and use per second if your translation is immensely wild.

redikann

  • Full Member
  • ***
  • Posts: 174
Re: Translate per second doesnt work
« Reply #2 on: January 16, 2014, 01:05:58 AM »
Also I could be wrong but your overriding your input vector with your input magnitude. Try multiplying your vector3 by your magnitude right before your translation.

phannDOTde

  • Full Member
  • ***
  • Posts: 237
    • Peter Hann .de
Re: Translate per second doesnt work
« Reply #3 on: January 16, 2014, 01:12:55 AM »
I need "fixed" because of using Physics, Per Second is important to get translations to be not related to FPS isnt it?

I can follow the changes of the Move Dir Vector while playing but it doesnt translate at all while using "per second".

didnt get that magnitude thing your wrote - maybe lack of lenguage knowledge on my side. But if I just leave the get axis + translate actions active it doesnt work eighter.

phannDOTde

  • Full Member
  • ***
  • Posts: 237
    • Peter Hann .de
Re: Translate per second doesnt work
« Reply #4 on: January 16, 2014, 01:18:44 AM »
the thing is, that if I use i.e. the "vector per second" action the vector becomes 0,0,0 no matter what. Not sure if it's my fault or the is something strange going on here.

redikann

  • Full Member
  • ***
  • Posts: 174
Re: Translate per second doesnt work
« Reply #5 on: January 16, 2014, 01:19:26 AM »
Per second will multiply it by Time.Delta Time , so you will become locked to FPS. Every frame is as many frames as you can render.
If your using physics and fixed update then I believe per second will not work because your update is just as it implies Fixed.
You should not need late update checked.

redikann

  • Full Member
  • ***
  • Posts: 174
Re: Translate per second doesnt work
« Reply #6 on: January 16, 2014, 01:29:17 AM »
Just tried your scene file and it played and controlled fine as far as I could tell.
Oh and I was wrong per second does work with fixed update.

phannDOTde

  • Full Member
  • ***
  • Posts: 237
    • Peter Hann .de
Re: Translate per second doesnt work
« Reply #7 on: January 16, 2014, 01:33:32 AM »
did it work with "per second" enabled? It might be a Beta Bug since I'm working with it.

phannDOTde

  • Full Member
  • ***
  • Posts: 237
    • Peter Hann .de
Re: Translate per second doesnt work
« Reply #8 on: January 16, 2014, 01:39:34 AM »
the "late update" is just used because of the position clamping to prevent the cube goes outside the screen limit.

redikann

  • Full Member
  • ***
  • Posts: 174
Re: Translate per second doesnt work
« Reply #9 on: January 16, 2014, 01:43:32 AM »
yes per second worked with fixed update but it was really slow compared to without it.

phannDOTde

  • Full Member
  • ***
  • Posts: 237
    • Peter Hann .de
Re: Translate per second doesnt work
« Reply #10 on: January 16, 2014, 02:00:52 AM »
Thanks, that might be a Beta Bug then. Moving speed is related to the Multiplier you'll add to the get Axis. It needs to be like *60 to get the same results with Per Second turned on.

phannDOTde

  • Full Member
  • ***
  • Posts: 237
    • Peter Hann .de
Re: Translate per second doesnt work
« Reply #11 on: January 16, 2014, 06:34:59 AM »
Never mind, seems some how my delta time default value was messed up and any new Scene I opened didnt behave rigth. I used Time Scale to fix the Delta time back to normal now everything is fine again.