Q16.webp
Lucy_boy1

Q16.webp

Kizspy | Question: 16
(Choose 1 answer)
Analyze the following code and determine what happens when the Apply Forces method is called in the script.
using UnityEngine;
public class ComplexForce: MonoBehaviour
public float mainForce = 20f;
public float sideForce = 5f;
private Rigidbody rb;
void Start()
rb GetComponent<Rigidbody>();
public void ApplyForces()
Vector3 combinedForce = (Vector3.up* mainForce) + (Vector3.right * sideForce);
rb.AddForce(combined Force, ForceMode.Impulse);
}
A. The GameObject will move upwards and to the left
B. The GameObject will move downwards and to the right
C. The GameObject will move upwards and to the right
D. The GameObject will remain stationary

Thông tin

Category
PRU212
Thêm bởi
Lucy_boy1
Ngày thêm
Lượt xem
3,557
Lượt bình luận
12
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom