Author Topic: Question about RCCs and synching a rotating terrain obstacle.  (Read 6433 times)

tstack

  • Newbie
  • *
  • Thank You
  • -Given: 5
  • -Receive: 0
  • Posts: 12
    • View Profile
Greetings, I have a question that is similar to a "moving platform game" question that involves multiple players in a local co-op / LAN game. *

Let's suppose that the game involves jumping on to and off of a simple playground merry-go-round, that is rotating very slowly:



The spacers in between the pie segments are solid walls, the space in the center is empty and large enough for a player to run through.

The players are very small compared to the merry-go-round, about the size of that white poly in the middle, and the merry-go-round is rotating very, very slowly.**

Obviously, we don't want players jumping through the "walls" between the segments, but they could collide with them and get knocked down, where they will lay on the floor of the rotating platform.

Q: Should I be instantiating this terrain obstacle and then using RCCs to share the axis rotation and rigidbody information? If I keep the update time relatively short will it stay in synch for all the players? What is the best way to do this? I have tried to keep the mesh size as low as possible and there aren't many colliders.

Thanks

* it is a single player or local co-op game only, to help keep latency down.
** there are multiple corridors that lead to this junction, and the rotation makes other entrances / exits available to the players.
« Last Edit: April 28, 2016, 06:41:50 AM by tstack »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Question about RCCs and synching a rotating terrain obstacle.
« Reply #1 on: April 29, 2016, 12:22:29 PM »
Assuming the rotation rate is constant, all you need to calculate the current rotation is to know the server time when rotation was at 0. Check the difference in TNManager.serverTime - startTime, multiply by rotation rate, there's your current rotation -- no RFCs necessary.

The "start" time can just be set as TNManager.SetChannelData.

tstack

  • Newbie
  • *
  • Thank You
  • -Given: 5
  • -Receive: 0
  • Posts: 12
    • View Profile
Re: Question about RCCs and synching a rotating terrain obstacle.
« Reply #2 on: May 02, 2016, 04:17:28 PM »
Thanks - my first few tries fell out of synch pretty quickly, I will try this next!