o3de / o3de-multiplayersample

Multiplayer sample project for the Open 3D Engine
https://o3de.org
Other
80 stars 57 forks source link

Demonstrate Teleportation in MultiplayerSample by implementing Death Warp #148

Closed AMZN-puvvadar closed 1 year ago

AMZN-puvvadar commented 2 years ago

Is your feature request related to a problem? Please describe. This relates to confusion around the usage m_resetCount in https://github.com/o3de/o3de/issues/9472. It's not clear how to implement teleportation without an example.

Describe the solution you'd like On Player Health reaching 0, teleport the player back to spawn with full health. Teleportation should be accomplished by incrementing m_resetCount on NetworkTransformComponent plus appropriate sets on the Entity's transform.

Describe alternatives you've considered Any type of movement feature that involves teleportation. For example, warping 100 meters forward. This is easily tested by warping past a stack of blocks without physically disturbing them.

lmbr-pip commented 2 years ago

Alternative is to implement telepads.

kberg0 commented 2 years ago

My recommendation would be to have a death AZ::Event on the health component.. make the MultiplayerSampleSystemComponent or alternatively a script canvas graph hook the zero-health event and invoke the multiplayer spawner API to retrieve the coords to teleport the character, then invoke the teleport API.

lmbr-pip commented 1 year ago

MPS + NewStarBase has functioning Teleporters, closing as deliver