Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.
New to the forum? Say hello in this topic! Also make sure to read the rules.
New to the forum? Say hello in this topic! Also make sure to read the rules.
Jittery Movement using SetLinearVelocity
Forum rules
By using the forum you agree to the following rules.
By using the forum you agree to the following rules.
-
- Fighter
- Posts: 28
- Joined: Wed Nov 02, 2016 12:59 am
- Started SFD: Sometime in Pre-Alpha
- Gender:
Jittery Movement using SetLinearVelocity
Hi, so I've spent a while creating a hoverboard script today, and it works fine in the map editor. The problem is that when I host an actual game, even if I'm the only person in the server, the movement of the hoverboards is super jittery. I can only expect this effect to become worse if other people join my game. Is this just a problem with SetLinearVelocity that I'll have to live with? Is there a different way to manipulate velocity that doesn't have this problem? Any help would be greatly appreciated.
1 x
- JakSparro98
- Superfighter
- Posts: 530
- Joined: Fri Jul 15, 2016 7:56 pm
- Started SFD: PreAlpha 1.0.5
- Location: Rome, Italy
- Gender:
- Age: 25
One year ago I had the same problem, I cannot find where the topic was posted though.ClockworkDice wrote: ↑Mon Jul 24, 2017 1:11 amHi, so I've spent a while creating a hoverboard script today, and it works fine in the map editor. The problem is that when I host an actual game, even if I'm the only person in the server, the movement of the hoverboards is super jittery. I can only expect this effect to become worse if other people join my game. Is this just a problem with SetLinearVelocity that I'll have to live with? Is there a different way to manipulate velocity that doesn't have this problem? Any help would be greatly appreciated.
Try to set the player position on himself before applying SetLinearVelocity.
0 x
-
- Fighter
- Posts: 28
- Joined: Wed Nov 02, 2016 12:59 am
- Started SFD: Sometime in Pre-Alpha
- Gender:
So you're saying that I should set the hoverboard's position to itself before changing velocity?
Like this: hoverboard.SetWorldPosition(hoverboard.GetWorldPosition());
I'll try it, but I'm not sure why that would have any effect.
EDIT: I tried it, and it actually made the problem worse. The problem is almost entirely on the Y-axis while moving upwards, if that helps.
Like this: hoverboard.SetWorldPosition(hoverboard.GetWorldPosition());
I'll try it, but I'm not sure why that would have any effect.
EDIT: I tried it, and it actually made the problem worse. The problem is almost entirely on the Y-axis while moving upwards, if that helps.
0 x
- JakSparro98
- Superfighter
- Posts: 530
- Joined: Fri Jul 15, 2016 7:56 pm
- Started SFD: PreAlpha 1.0.5
- Location: Rome, Italy
- Gender:
- Age: 25
Can you please post your code so I can investigate the issue?
0 x
- Motto73
- Superfighter
- Posts: 316
- Joined: Mon May 09, 2016 7:35 am
- Title: Lazy ass
- SFD Account: Motto73
- Started SFD: Multiplayer Test Demo
- Location: Sunny City
- Gender:
- Age: 24
Yea, having the same problem with many scripts with calling some method very much on shprt time. OnUpdate things update faster in the map editor, even if there's as many frames when hosting.
0 x