fix: addingNetwork rigidbody icon and AddComponentMenu attribute (#2051)

* adding icon

* adding attributes

* adding docs

* adding disclaimer at top of doc
This commit is contained in:
James Frowen 2020-06-28 23:47:50 +01:00 committed by GitHub
parent 0c30d3398a
commit ab1b92f74b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 26 additions and 1 deletions

View File

@ -2,6 +2,8 @@
namespace Mirror.Experimental namespace Mirror.Experimental
{ {
[AddComponentMenu("Network/Experimental/NetworkRigidbody")]
[HelpURL("https://mirror-networking.com/docs/Components/NetworkRigidbody.html")]
public class NetworkRigidbody : NetworkBehaviour public class NetworkRigidbody : NetworkBehaviour
{ {
static readonly ILogger logger = LogFactory.GetLogger(typeof(NetworkRigidbody)); static readonly ILogger logger = LogFactory.GetLogger(typeof(NetworkRigidbody));

View File

@ -5,7 +5,7 @@ MonoImporter:
serializedVersion: 2 serializedVersion: 2
defaultReferences: [] defaultReferences: []
executionOrder: 0 executionOrder: 0
icon: {instanceID: 0} icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -0,0 +1,21 @@
# Network Rigidbody
> The Network Rigidbody classed as "Experimental" for now so please share any problems or bugs you find with it and use at your own risk if production builds.
The Network Rigidbody component synchronizes velocity and other properties of a rigidbody across the network. This component is useful when you have a non-kinematic rigidbody that have constant forces applied to them, like gravity, but also want to apply forces or change velocity to that rigidbody or server or client with authority. For example, objects that move and jump using rigidbody using gravity.
A game object with a Network Rigidbody component must also have a Network Identity component. When you add a Network Rigidbody component to a game object, Mirror also adds a Network Identity component on that game object if it does not already have one.
Network Rigidbody works best when there is also a NetworkTransform for the object to keep position as well as velocity in sync.
![Network Rigidbody inspector](NetworkRigidbody.png)
By default, Network Rigidbody is server-authoritative unless you check the box for **Client Authority**. Client Authority applies to player objects as well as non-player objects that have been specifically assigned to a client, but only for this component. With this enabled, value changes are send from the client to the server.
The **Sensitivity** options allow you to set a minimum thresholds before values are send over network. This helps minimize network traffic for very small changes.
For some object you may not want them to rotate but don't need to sync the Angular Velocity. The **Clear Angular Velocity** will set the Angular Velocity to zero each frame causing the minimizing when objects rotation. The same can apply to **Clear Velocity**. If **Clear Velocity Velocity** is enabled then clear is ignored.
Normally, changes are sent to all observers of the object this component is on. Setting **Sync Mode** to Owner Only makes the changes private between the server and the client owner of the object.
You can use the **Sync Interval** to specify how often it syncs (in seconds). This applies both to Client Authority and Server Authority.

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View File

@ -24,6 +24,8 @@ These core components are included in Mirror:
The Network Match Checker component controls visibility of networked objects based on match id. The Network Match Checker component controls visibility of networked objects based on match id.
- [Network Proximity Checker](NetworkProximityChecker.md) - [Network Proximity Checker](NetworkProximityChecker.md)
The Network Proximity Checker component controls the visibility of game objects for network clients, based on proximity to players. The Network Proximity Checker component controls the visibility of game objects for network clients, based on proximity to players.
- [Network Rigidbody](NetworkRigidbody.md)
The Network Rigidbody synchronizes velocity and other properties of a rigidbody across the network.
- [Network Room Manager](NetworkRoomManager.md) - [Network Room Manager](NetworkRoomManager.md)
The Network Room Manager is an extension component of Network Manager that provides a basic functional room. The Network Room Manager is an extension component of Network Manager that provides a basic functional room.
- [Network Room Player](NetworkRoomPlayer.md) - [Network Room Player](NetworkRoomPlayer.md)