playMaker

Author Topic: Translate per second  (Read 2799 times)

sebaslive

  • Hero Member
  • *****
  • Posts: 557
    • View Profile
    • Frame Tale Studios
Translate per second
« on: October 19, 2013, 05:45:24 PM »
Hey All, I am using translate on y to follow an object but per second is a bit too slow and without it is just unnatural. Is there a good inbetween that can make the per second faster? Per second x 4
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

Dev_Sebas

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 398
    • View Profile
    • Blog
Re: Translate per second
« Reply #1 on: October 20, 2013, 05:35:38 AM »
Multiply your speed float by 4.
Cheers
Seb

sebaslive

  • Hero Member
  • *****
  • Posts: 557
    • View Profile
    • Frame Tale Studios
Re: Translate per second
« Reply #2 on: October 20, 2013, 09:48:33 AM »
Hey Seb, it needs to be per second. Even though it may seem to go faster it still uses the per second to get to that speed. I need the object to react faster from the start.
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

redikann

  • Full Member
  • ***
  • Posts: 174
    • View Profile
Re: Translate per second
« Reply #3 on: October 20, 2013, 10:48:04 AM »
Whatever variable you are feeding it (per second)needs To be ready to go because per second means your VAR*time.delta time. So you end up with a frame rate independent translation. Multiply whatever is going into that action before it gets to that action. When you have your state logic setup you can keep tweaking how much you are multiplying by till it feels right.

sebaslive

  • Hero Member
  • *****
  • Posts: 557
    • View Profile
    • Frame Tale Studios
Re: Translate per second
« Reply #4 on: October 20, 2013, 01:49:14 PM »
I'm not sure I follow but I assume that you are writing as if the translate has a value you can insert for the per second which is not currently present on the action. The solution may be a custom action where you can actually change the per second value.

https://hutonggames.fogbugz.com/default.asp?W201
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

CareLevelZero

  • Playmaker Newbie
  • *
  • Posts: 14
  • All design, all the time.
    • View Profile
Re: Translate per second
« Reply #5 on: October 20, 2013, 02:28:35 PM »
Would one of the iTween actions be better suited for the task at hand, perhaps?  Some of them include time and/or speed values.

redikann

  • Full Member
  • ***
  • Posts: 174
    • View Profile
Re: Translate per second
« Reply #6 on: October 20, 2013, 07:39:22 PM »
No sir. I know you cant plug anything into the per second option. But you are moving an object on the y axis to follow another object. That means that whatever your inputting into the Y axis is also being multiplied by per second (which is the time it takes to render a frame). Let's say you happen to be rendering at 100 FPS and your moving 4 in the Y axis or (4 x .01  every frame). Your translation has been greatly reduced but has become frame rate independent. The only way to counter this would be to use something greater than 4 and that means you might have to try a lot of different variables until you feel the movement is perfect.
« Last Edit: October 20, 2013, 07:45:04 PM by redikann »

sebaslive

  • Hero Member
  • *****
  • Posts: 557
    • View Profile
    • Frame Tale Studios
Re: Translate per second
« Reply #7 on: October 21, 2013, 01:37:34 PM »
Hey Redikann cool I understand better but when I mess with the Y variable it still moves wonky.

It's a pong game and the a.i. is tracking the y of the ball with the per second set  but when I set it to higher values and the ball is y positive it has a huge delay and slams the top of the screen. When the ball goes negative the bar has the delay and slams to the bottom. It's the delay that is messing up the feel of the A.i.

If there was a way to control both the 4 and the .01 that would seem ideal.

@carelevelzero i tried some itween options but from what I attempted and read here it leads me to use translate as the best option but I will give another try.
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

redikann

  • Full Member
  • ***
  • Posts: 174
    • View Profile
Re: Translate per second
« Reply #8 on: October 21, 2013, 01:45:37 PM »
Is it 3d or 2d

sebaslive

  • Hero Member
  • *****
  • Posts: 557
    • View Profile
    • Frame Tale Studios
Re: Translate per second
« Reply #9 on: October 21, 2013, 03:37:23 PM »
2D
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

sebaslive

  • Hero Member
  • *****
  • Posts: 557
    • View Profile
    • Frame Tale Studios
Re: Translate per second
« Reply #10 on: October 21, 2013, 06:02:33 PM »
Update: I have messed with the code and changed the delta time and I guess I don't have a full understanding of this because everything I changed still leads to the same result which has led me to believe that this is .translates fault!!

.translate is what is causing the delay because when I switched to just messing with the transform position it does not have a delay at all.

sigh... what good are you .translate?

I like the little delay it gives but it is just too slow. Anyways I am using a new way which works but if anyone knows how this works that would be very helpful!
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez