Quantcast
Channel: Recent Discussions — Photon Engine
Viewing all articles
Browse latest Browse all 15755

Using Third Party Assets (Such as Third Person Shooter)

$
0
0
Hi I was going through the tutorials and I noticed that there is a lot of code in special methods like SimulateOwner where you update your transform position due to input. And you are also using BoltNetwork.frameDeltaTime which I know is deferred at the moment to fixedDeltaTime.

public override void SimulateOwner() {
var speed = 4f;
var movement = Vector3.zero;

if (Input.GetKey(KeyCode.W)) { movement.z += 1; }
if (Input.GetKey(KeyCode.S)) { movement.z -= 1; }
if (Input.GetKey(KeyCode.A)) { movement.x -= 1; }
if (Input.GetKey(KeyCode.D)) { movement.x += 1; }

if (movement != Vector3.zero) {
transform.position = transform.position + (movement.normalized * speed * BoltNetwork.frameDeltaTime);
}
}
So my question is what happens when I use the ThirdPersonShooter asset that I bought and it's not using SimulateOwner and BoltNetwork.frameDeltaTime? Is there a technique for working around this?

THank you for any help.

Viewing all articles
Browse latest Browse all 15755

Trending Articles