Moving Platform Problems

MatB

New member
I have a simple disk shape on the 'MovingPlatform' layer. It is able to be moved around arbitrarily. Players can walk on it.

When it is stationary, when a remote peer connects and walks on this surface, the translation of the character is not smooth (as observed by the local player). When the character jumps the effect is even worse.

If the disk moves anywhere in the XZ plane and the player jumps, the character seems to teleport several meters away during the animation, then snap back to where you might expect them to have landed. This happens even if the disk is moved and then brought back to being stationary before jumping (as is demonstrated in this video: MovingPlatformArtifact)

This is just an minimally edited OpsivePUN demo scene using AtlasPUN. ( I see similar 'artifacts' btw on any of the moving platforms within the unedited scene). These artifacts occur even if I connect locally, it's nothing to do with latency.

Do you have any idea why this is happening over the network? I don't know where to start looking - there is so much Opsive code...

Thanks for any help
 
I was able to reproduce this in the PUN demo scene by setting the plane to the moving platform layer and assigning a moving platform component to it. Thanks for the report - I'll fix it for the next PUN update.
 
Can you give me a rough ETA of how long that will take Justin? We have a milestone to hit so if it will take longer than a few days we're going to have to try to fix it ourselves. If the latter, can you help point us in the right direction?
 
Also, we have noticed that, when player characters are on a Moving Platform, hits do not register client side.
 
This change will likely be made in PunCharacterTransformMonitor. I am going to look at it this week. If it's a small change then I can send it to you but if it affects multiple classes I will be doing an update in mid-August before I leave for devcom.
 
This change will likely be made in PunCharacterTransformMonitor. I am going to look at it this week. If it's a small change then I can send it to you but if it affects multiple classes I will be doing an update in mid-August before I leave for devcom.
Hi Justin. Did you get anywhere with this? We've noticed other moving platform related problems now. The most problematic is that it becomes difficult or impossible to shoot another player when standing on anything set to the 'MovingPlatform' layer.
 
I have it fixed but haven't been able to push an update. I'm at a conference right now but I'll be able to send you the file within a few days
 
Hi @Justin, is this issue fixed? I'm having the same issue where the remote players vanish and reappear in the starting location once the platform stops moving. Btw, my moving platform is just an empty gameobject with it's layer set to MovingPlatform. It doesn't have any PUNMovingPlatform script attached.

Another thing I've noted is that, the other player's transform shoots high into the sky in local but the character is the same location in remote. I'm not sure why the transforms are not synced.
 
Last edited:
Yes, it was. If you can tell me how to reproduce what you are seeing within the demo scene I'll take a look.
 
Thanks for getting back to me! I'm trying to create an ability similar to Reinhardt's Charge from Overwatch. The character dashes forward, and if another player is in the path, they get grabbed and move with the dasher until the ability ends or they hit a wall.

I'm stuck on the grab part. I'm using the SetMovingPlatform method on the enemy's UltimateCharacterLocomotion with a transform on the player's gameobject with it's layer set to MovingPlatform. For some reason, the opponent doesn't move with the player on remote. But in local, the opponent shoots up into the sky and moves with the player, but returns to the remote player's location after the ability ends.

Here's a short video showing the ability in action: https://streamable.com/5a6ks9 and here's the source code of the ability: https://pastebin.com/qTXi6fnJ

Not sure what I'm missing. Any ideas?

Thanks!
 
Interesting use of the moving platform functionality :)

I wonder if it's a layer issue - I wouldn't change the layer to MovingPlatform since that layer isn't setup to act as a character. As a test instead of using your ability can you try the MoveWithObject ability to see if you can get the two characters moving together? This is essentially an essentials only version of SetMovingPlatform.
 
hey! I just seen this and wow haha, extremely wide use case for a moving platform, and this is one Id never of imagined, kinda a good idea though and I see your using UMP, do you have USC? I ask as really anything can be a "seat" and may just suit your needs and be super awesome to see done with it, you can set animation per seat or entry too, so just maybe that can make light work of a seemingly complex task?

My guess already for mp, using a moving platform as a child of will give issues, and setting a character in that will give more. In USC a custom platform is used for the ute, its detached from the vehicle at runtime and updated to match. That maybe even some help for idea.
 
@Justin I've tried setting a transform on the opponent's MoveWithObject but for some reason the opponent doesn't move with the player. The opponent moves with a transform only when the target transform is it's own gameobject and not a child of the player.

@FastSkillTeam I bought USC along with the UMP but never got around to using it. I ran a couple of rough tests and it seems to do the trick! I'm finally able to move the opponent along with the player!! But I'm not sure how to make the opponent board the player through script. I tried the following but nothing happens:

C#:
var _enemyBoardAbility = grabbedEnemy.m_characterLocomotion.GetAbility<Board>();
_enemyBoardAbility.BoardSource = _movingPlatform;
grabbedEnemy.m_characterLocomotion.TryStartAbility(_enemyBoardAbility, true);

Am I missing something? Great addon btw! I'm brimming with ideas after experimenting with the USC demo!
 
I'm glad that USC worked for you! I would pursue that solution since it seems like it is going to work better.
 
Back
Top