Skip to content
Permalink
Browse files

[Samples] PhysicsSample: Update for Vector3 Gravity

  • Loading branch information
xen2 committed Dec 1, 2018
1 parent 303cf24 commit 31e2160d495ebb7225482727e9eab5187e28eb7b
@@ -62,7 +62,7 @@ public override void Start()

//Please remember that in the GameStudio element the parameter Step Height is extremely important, it not set properly it will cause the entity to snap fast to the ground
playerController.JumpSpeed = 5.0f;
playerController.Gravity = -10.0f;
playerController.Gravity = new Vector3(0.0f, -10.0f, 0.0f);
playerController.FallSpeed = 10.0f;
playerController.ProcessCollisions = true;

@@ -16,7 +16,7 @@ public class Player : SyncScript
public override void Start()
{
character = Entity.Get<CharacterComponent>();
character.Gravity = -10.0f;
character.Gravity = new Vector3(0.0f, -10.0f, 0.0f);
var rigidBodyComponent = Entity.Get<RigidbodyComponent>();
if (rigidBodyComponent != null)
{

0 comments on commit 31e2160

Please sign in to comment.
You can’t perform that action at this time.