Exemplo n.º 1
0
    // Start is called before the first frame update
    void Start()
    {
        //importing ArrowDirection for Electromagnetic Effects
        //ArrowDirection2 = emfields.GetComponent<ArrowDirection2>();
        GeneralRelmetric = metric.GetComponent <GeneralRelmetric>();
        StairInstantiate = CubePrefab.GetComponent <StairInstantiate>();
        //defining rotation matrix
        R = Matrix4x4.identity;

        //defining starting position of player
        playrposworldframe3   = this.transform.position;
        playrposworldframe4   = playrposworldframe3;
        playrposworldframe4.w = 0.0f;

        //defining starting velocity of player
        playrvelworldframe4   = playrvelworldframe3;
        playrvelworldframe4.w = 1.0f;

        //defining starting velocity of player
        playraccelworldframe4   = playraccelworldframe3;
        playraccelworldframe4.w = 0.0f;
        //defining the initial Lorentz transformation
        Lplayer = Matrix4x4.identity;

        //defining metric tensor
        //metrictensor = Matrix4x4.identity;
        //metrictensor.m33 = -1;
        metrictensor = GeneralRelmetric.metrictensor;

        //defining effective chargeovermass of player
        //qoverm = 0.0f;

        /*defining unit acceleration
         * unitAccel = 0.05f;
         * gravity = 0.02f;
         */

        //defining Electromagnetic tensor at player's position
        //Ftensor = ArrowDirection2.G;
        //defining Lorentz Force in world frame
        //LorentzForceworldframe = qoverm * (metrictensor * Ftensor * playrvelworldframe4);

        this.transform.position = Lplayer * playrposworldframe4;
    }
Exemplo n.º 2
0
 // Start is called before the first frame update
 void Start()
 {
     PlayerView       = player.GetComponent <PlayerView>();
     StairInstantiate = Instant.GetComponent <StairInstantiate>();
     Objects          = Stair.GetComponent <Objects>();
 }