mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
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:
parent
0c30d3398a
commit
ab1b92f74b
@ -2,6 +2,8 @@
|
||||
|
||||
namespace Mirror.Experimental
|
||||
{
|
||||
[AddComponentMenu("Network/Experimental/NetworkRigidbody")]
|
||||
[HelpURL("https://mirror-networking.com/docs/Components/NetworkRigidbody.html")]
|
||||
public class NetworkRigidbody : NetworkBehaviour
|
||||
{
|
||||
static readonly ILogger logger = LogFactory.GetLogger(typeof(NetworkRigidbody));
|
||||
|
@ -5,7 +5,7 @@ MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
21
doc/Components/NetworkRigidbody.md
Normal file
21
doc/Components/NetworkRigidbody.md
Normal 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.
|
BIN
doc/Components/NetworkRigidbody.png
Normal file
BIN
doc/Components/NetworkRigidbody.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 37 KiB |
@ -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.
|
||||
- [Network Proximity Checker](NetworkProximityChecker.md)
|
||||
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)
|
||||
The Network Room Manager is an extension component of Network Manager that provides a basic functional room.
|
||||
- [Network Room Player](NetworkRoomPlayer.md)
|
||||
|
Loading…
Reference in New Issue
Block a user